[src]

Module sync::raw

Raw concurrency primitives you know and love.

These primitives are not recommended for general use, but are provided for flavorful use-cases. It is recommended to use the types at the top of the sync crate which wrap values directly and provide safer abstractions for containing data.

Condvar

A mechanism for atomic-unlock-and-deschedule blocking and signalling.

Mutex

A blocking, bounded-waiting, mutual exclusion lock with an associated FIFO condition variable.

MutexGuard

An RAII structure which is used to gain access to a mutex's condition variable. Additionally, when a value of this type is dropped, the corresponding mutex is also unlocked.

RWLock

A blocking, no-starvation, reader-writer lock with an associated condvar.

RWLockReadGuard

An RAII helper which is created by acquiring a read lock on an RWLock. When dropped, this will unlock the RWLock.

RWLockWriteGuard

An RAII helper which is created by acquiring a write lock on an RWLock. When dropped, this will unlock the RWLock.

Semaphore

A counting, blocking, bounded-waiting semaphore.

SemaphoreGuard

An RAII guard used to represent an acquired resource to a semaphore. When dropped, this value will release the resource back to the semaphore.