4 ms·
I’m on mobile so it’s tough to look up the details, but IIRC at least Windows? Implementations of the standard library mutexes are here https://github.com/rust
by steveklabnik 3y ago
I’m on mobile so it’s tough to look up the details, but IIRC at least Windows?
Implementations of the standard library mutexes are here https://github.com/rust-lang/rust/tree/master/library/std/src/sys/locks/mutex https://github.com/rust-lang/rust/tree/master/library/std/sr...
And of course it’s pthreads on Linux.
- gpderetta 3y agoWindows has a lot of mutex and signaling primitives. Some of them can be asynchronously waited on. It also has an IoRing and I wouldn't be surprised if keyed events (the local futex equivalent) will be supported in the future. As an aside, it is interesting that rust uses pthread_mutex for its standard library mutex. GCC/libstdc++ regrets that decision as its std::mutex is now way larger than it needs to be but it is now permanently baked in the ABI. I guess rust still doesn't guarantee ABI stability so the decision could be reversed in the future.