Crate parking_lot[−][src]
This library provides implementations of Mutex, RwLock, Condvar and
Once that are smaller, faster and more flexible than those in the Rust
standard library. It also provides a ReentrantMutex type.
Re-exports
pub use lock_api; |
Structs
| Condvar | A Condition Variable |
| Once | A synchronization primitive which can be used to run a one-time initialization. Useful for one-time initialization for globals, FFI or related functionality. |
| RawFairMutex | Raw fair mutex type backed by the parking lot. |
| RawMutex | Raw mutex type backed by the parking lot. |
| RawRwLock | Raw reader-writer lock type backed by the parking lot. |
| RawThreadId | Implementation of the |
| WaitTimeoutResult | A type indicating whether a timed wait on a condition variable returned due to a time out or not. |
Enums
| OnceState | Current state of a |
Functions
| const_fair_mutex | Creates a new fair mutex in an unlocked state ready for use. |
| const_mutex | Creates a new mutex in an unlocked state ready for use. |
| const_reentrant_mutex | Creates a new reentrant mutex in an unlocked state ready for use. |
| const_rwlock | Creates a new instance of an |
Type Definitions
| FairMutex | A mutual exclusive primitive that is always fair, useful for protecting shared data |
| FairMutexGuard | An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked. |
| MappedFairMutexGuard | An RAII mutex guard returned by |
| MappedMutexGuard | An RAII mutex guard returned by |
| MappedReentrantMutexGuard | An RAII mutex guard returned by |
| MappedRwLockReadGuard | An RAII read lock guard returned by |
| MappedRwLockWriteGuard | An RAII write lock guard returned by |
| Mutex | A mutual exclusion primitive useful for protecting shared data |
| MutexGuard | An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked. |
| ReentrantMutex | A mutex which can be recursively locked by a single thread. |
| ReentrantMutexGuard | An RAII implementation of a “scoped lock” of a reentrant mutex. When this structure is dropped (falls out of scope), the lock will be unlocked. |
| RwLock | A reader-writer lock |
| RwLockReadGuard | RAII structure used to release the shared read access of a lock when dropped. |
| RwLockUpgradableReadGuard | RAII structure used to release the upgradable read access of a lock when dropped. |
| RwLockWriteGuard | RAII structure used to release the exclusive write access of a lock when dropped. |