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