-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Description
Description
std::mutex is currently powered by ConcRT to support Windows XP. As a result the size of mutex is too big to fit in a cache line.
When XP support can be dropped, the size can be reduced to sizeof(void*) by changing mutex to be an SRWLOCK, which is the highest performance lock provided by Windows.
Semi-duplicate description
- From <mutex>: Implement mutex and recursive_mutex on SRW Lock. Support recursion only on recursive_mutex #654
<mutex>: Implementmutexandrecursive_mutexon SRW Lock. Support recursion only onrecursive_mutex- correctness (
constexprconstruction) - no undesired strengthening (recursion on non-recursive deliberately not behaving correctly)
- performance (no dynamic API binding => no control flow guard overhead; no recursion support overhead)
- correctness (
Additional context
See also: Developer Community DevCom-334696 and Microsoft-internal VSO-685103 / AB#685103.
vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.
TheStormN