Module sync

Module sync 

Source
Expand description

Alternative synchronization primitives that are more cancellation-aware.

Currently, this crate contains RobustMutex, which is a variant on an async mutex that is more cancel-safe. For more about how this differs from tokio::sync::Mutex, see the documentation for RobustMutex.

Structs§

ActionPermitstd
A token that grants the ability to run one closure against the data guarded by a RobustMutex.
PoisonErrorstd
A type of error which can be returned whenever a RobustMutex is acquired.
RobustMutexstd
A cancel-safe and panic-safe variant of tokio::sync::Mutex.

Enums§

TryLockErrorstd
An enumeration of possible errors associated with a TryLockResult which can occur while trying to acquire a lock, from the try_lock method on a RobustMutex.

Type Aliases§

LockResultstd
A type alias for the result of a lock method which can be poisoned.
TryLockResultstd
A type alias for the result of a nonblocking locking method.