Expand description
Useful synchronization primitives.
Modules§
- atomic
- Atomic types
Structs§
- Arc
- A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
- Mutex
- A mutual exclusion primitive useful for protecting shared data
- Mutex
Guard - An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
- Weak
Weakis a version ofArcthat holds a non-owning reference to the managed allocation.- Exclusive
Experimental Exclusiveprovides only mutable access, also referred to as exclusive access to the underlying value. It provides no immutable, or shared access to the underlying value.- Unique
Arc Experimental - A uniquely owned
Arc.
Enums§
- TryLock
Error - An enumeration of possible errors associated with a
TryLockResultwhich can occur while trying to acquire a lock, from thetry_lockmethod on aMutexor thetry_readandtry_writemethods on anRwLock.
Type Aliases§
- Lock
Result - TryLock
Result - A type alias for the result of a nonblocking locking method.