Module concurrency_traits::mutex[][src]

Expand description

Generic Mutex traits and implementations.

Structs

CustomMutex

A Mutex based on a given RawTryMutex

CustomMutexGuard

A guard for a CustomMutex

RawAtomicMutex

The raw portion of AtomicMutex.

RawCustomAsyncMutex

A converter for turning a RawMutex into a RawAsyncMutex. Runs all operations on own task.

RawFullAsyncMutex

The raw portion of FullAsyncMutex.

RawParkMutex

The raw portion of ParkMutex.

RawSpinLock

The raw portion of SpinLock.

Enums

RawCustomAsyncMutexMessage

The message used for RawCustomAsyncMutex

Traits

AsyncMutex

A generic async mutex trait

AsyncTimeoutMutex

An async mutex that locking can timeout on.

Mutex

A Generic Mutex trait

MutexSized

The functions for Mutex that only work for sized types. Separated to allow Mutex to be a trait object.

RawAsyncMutex

A raw async mutex that hold no data but the lock itself.

RawAsyncTimeoutMutex

A raw async mutex that can be timed out and holds no data.

RawMutex

A raw mutex that hold no data but the lock itself.

RawTimeoutMutex

A raw mutex that can be timed out and holds no data.

RawTryMutex

A raw mutex that can be tried and holds no data.

TimeoutMutex

A mutex that can timeout for locking

TimeoutMutexSized

The functions for TimeoutMutex that only work for sized types. Separated to allow TimeoutMutex to be a trait object.

TryMutex

A non-blocking mutex with try functions.

TryMutexSized

The functions for TryMutex that only work for sized types. Separated to allow TryMutex to be a trait object.

Type Definitions

AtomicMutex

A mutex based on an AtomicBool. Only supports try operations (TryMutex).

CustomAsyncMutex

A Custom mutex with async operations based on a RawMutex.

FullAsyncMutex

A mutex that can only be accessed through async await or try operations.

ParkMutex

A mutex that relies on parking the thread that locks it. Uses RawParkMutex

ParkMutexStd

A ParkMutex that uses std functions.

RawParkMutexStd

A RawParkMutex that uses std functions.

SpinLock

A lock that spins while being locked. Should only be locked for very short operations.

SpinLockStd

A SpinLock that uses std functions.