Expand description
Synchronization primitives working across std, no-std and wasm environments.
Modules§
- reentrant
- Re-entrant locking primitives, available in std environments.
Structs§
- Arc
- A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
- Lazy
- A value which is initialized on the first access.
- Mutex
- A mutual exclusion primitive useful for protecting shared data
- RwLock
- A reader-writer lock which is exclusively locked for writing or shared for reading.
This reader-writer lock will block threads waiting for the lock to become available.
The lock can also be statically initialized or created via a
RwLock::newRwLockwrapper to makespin::RwLockAPI compatible withstd::sync::RwLockto swap - RwLock
Read Guard - RAII structure used to release the shared read access of a lock when dropped.
- RwLock
Write Guard - RAII structure used to release the exclusive write access of a lock when dropped.
- Sync
Once Cell - A cell that provides lazy one-time initialization that implements Sync and Send.
- Thread
Id - An opaque thread identifier.
Enums§
- Ordering
- Atomic memory orderings
Type Aliases§
- Atomic
Bool - A boolean type which can be safely shared between threads.
- Atomic
U8 - An integer type which can be safely shared between threads.
- Atomic
U32 - An integer type which can be safely shared between threads.
- Atomic
Usize - An integer type which can be safely shared between threads.
- Once
- A spin-based one-time initialization cell, identical on every target.