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
Although it is tradition in Rust to have types such as Semaphores and
Mutexes not implement Sync, these primitives, built as thing wrappers
become fairly useless. Sharing them would require `Arc`, which requires
alloc. Presumably someone wanting to use lower level primitives would
also not likely be wanting to use allocation.
For the most part, these primtives have as their real purpose to be used
in the implementation of the higher level synchronization primtives,
such as sync::Mutex.
unlock is unsafe because it is required to only call unlock on the same
thread that locked.
Signed-off-by: David Brown <[email protected]>
0 commit comments