AsyncLock
struct · ferroui-reactive · v0.5.0
struct AsyncLock
Runs queued actions one at a time (AsyncLock).
Upstream serializes threads with a lock; on one thread the lock is the re-entrancy guard: an action queued from inside another runs when that one has returned. A panicking action leaves the lock faulted: the actions still queued are dropped and later ones are ignored, as upstream clears its queue and ignores later calls after an exception.
Members
new
fn new() -> Self
wait
fn wait(self: &Self, action: impl FnOnce() -> () + 'static)
Queues action and runs the queue if no action is running (Wait).
dispose
fn dispose(self: &Self)
Drops the queued actions and ignores later ones (Dispose).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.