You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's very common to use a single mutex with many condition variables.
Windows Vista and later have support for native condition variables without emulation. Windows XP support ends in April 2014 so there's no need for Rust to cripple the API to support it.
extra::Mutex can be initialized with multiple condition variables, though you can't use the Condvar without holding the associated lock first. The API's also a bit awkward.
To clarify, I'm talking about the native std::unstable::Mutex type. The type in extra is a slow implementation on top of the scheduler. A high quality mutex like the ones provided by glibc and Windows will do a micro-optimized spin before falling back to a fast system call to block. If there isn't a need to block, there will be no system call or context switch.
Update subtree sync docs for changes in rustc-dev-guide
Companion PR to rust-lang/rustc-dev-guide#1653. That still keeps a `contributing.html` with an "External Contributions" section, so hopefully it won't be too disruptive.
changelog: none
It's very common to use a single mutex with many condition variables.
Windows Vista and later have support for native condition variables without emulation. Windows XP support ends in April 2014 so there's no need for Rust to cripple the API to support it.
A simple example: https://github.com/thestinger/rust-core/blob/master/core/concurrent.rs#L73
The text was updated successfully, but these errors were encountered: