Crate syncExperimental[src]
Core concurrency-enabled mechanisms and primitives.
This crate contains the implementations of Rust's core synchronization primitives. This includes channels, mutexes, condition variables, etc.
The interface of this crate is experimental, and it is not recommended to
use this crate specifically. Instead, its functionality is reexported
through std::sync.
Reexports
pub use raw::{Semaphore, SemaphoreGuard}; |
Modules
| atomics | Atomic types |
| comm | Communication primitives for concurrent tasks |
| deque | A (mostly) lock-free concurrent work-stealing deque |
| mpmc_bounded_queue | |
| mpsc_queue | A mostly lock-free multi-producer, single consumer queue. |
| mutex | A proper mutex implementation regardless of the "flavor of task" which is acquiring the lock. |
| one | A "once initialization" primitive |
| raw | Raw concurrency primitives you know and love. |
| spsc_queue | A single-producer single-consumer concurrent queue |
Structs
| Arc | An atomically reference counted wrapper for shared state. |
| Barrier | A barrier enables multiple tasks to synchronize the beginning of some computation. |
| Condvar | A condition variable, a mechanism for unlock-and-descheduling and signaling, for use with the lock types. |
| Mutex | A wrapper type which provides synchronized access to the underlying data, of
type |
| MutexGuard | An guard which is created by locking a mutex. Through this guard the underlying data can be accessed. |
| RWLock | A dual-mode reader-writer lock. The data can be accessed mutably or immutably, and immutably-accessing tasks may run concurrently. |
| RWLockReadGuard | A guard which is created by locking an rwlock in read mode. Through this guard the underlying data can be accessed. |
| RWLockWriteGuard | A guard which is created by locking an rwlock in write mode. Through this guard the underlying data can be accessed. |
| Weak | A weak pointer to an |