Expand description
Provides various synchronization alternatives to language primitives.
Currently missing from this module are the following items:
Condvar
WaitTimeoutResult
mpsc
Otherwise, this is a drop-in replacement for std::sync
.
Modules§
- Provides various atomic alternatives to language primitives.
Structs§
- A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
- A barrier enables multiple threads to synchronize the beginning of some computation.
- A
BarrierWaitResult
is returned byBarrier::wait()
when all threads in theBarrier
have rendezvoused. - A value which is initialized on the first access.
- A mutual exclusion primitive useful for protecting shared data
- An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
- A low-level synchronization primitive for one-time global execution.
- A synchronization primitive which can nominally be written to only once.
- State yielded to
Once::call_once_force()
’s closure parameter. The state can be used to query the poison status of theOnce
. - A type of error which can be returned whenever a lock is acquired.
- A reader-writer lock
- RAII structure used to release the shared read access of a lock when dropped.
- RAII structure used to release the exclusive write access of a lock when dropped.
Weak
is a version ofArc
that holds a non-owning reference to the managed allocation.
Enums§
Type Aliases§
- A type alias for the result of a lock method which can be poisoned.
- A type alias for the result of a nonblocking locking method.