Module cancel_safe_futures::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§
- ActionPermit
std
A token that grants the ability to run one closure against the data guarded by aRobustMutex
. - PoisonError
std
A type of error which can be returned whenever aRobustMutex
is acquired. - RobustMutex
std
A cancel-safe and panic-safe variant oftokio::sync::Mutex
.
Enums§
- TryLockError
std
An enumeration of possible errors associated with aTryLockResult
which can occur while trying to acquire a lock, from thetry_lock
method on aRobustMutex
.
Type Aliases§
- LockResult
std
A type alias for the result of a lock method which can be poisoned. - A type alias for the result of a nonblocking locking method.