Change Mutex to use SRWLock on Windows.#20367
Conversation
|
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
|
Can you add a comment in the code as well explaining why one might expect us to use a Other than that though r=me, nice find! |
91efcdc to
6b21ee0
Compare
|
Comment added and rebased. |
|
We already use the unfair |
|
I'd be fine with holding off on this PR until a design consensus is made regarding the fairness of the locks that Rust provides. In the meantime someone can add a simple flag/semaphore/whatever to Mutex to fix the recursive locking issue. |
|
When stabilizing the The current plan is to definitely allow for these primitives to grow in the future with perhaps a new |
54cc177 to
b939b89
Compare
|
Needs a rebase |
|
Rebased |
|
@retep998 needs a rebase |
|
Rebased. |
Signed-off-by: Peter Atashian <retep998@gmail.com>
|
Rebased again... |
Also adjusted some of the FFI definitions because apparently they don't use the long pointer prefix. Gives a free performance boost because `SRWLock` is several times faster than `CriticalRegion` on every Windows system tested. Fixes #19962
Also adjusted some of the FFI definitions because apparently they don't use the long pointer prefix.
Gives a free performance boost because
SRWLockis several times faster thanCriticalRegionon every Windows system tested.Fixes #19962