FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    new

    fn new() -> Self
    

    Source

    wait

    fn wait(self: &Self, action: impl FnOnce() -> () + 'static)
    

    Queues action and runs the queue if no action is running (Wait).

    Source

    dispose

    fn dispose(self: &Self)
    

    Drops the queued actions and ignores later ones (Dispose).

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • Default

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.