DisposableLock
struct · ferroui-base · v0.5.0
struct DisposableLock
A lock whose holder gets a disposable that releases it.
The thread that holds the lock may take it again (the lock of the reference is a monitor); each disposable releases one entry, on the thread that took it.
Members
new
fn new() -> Self
try_lock
fn try_lock(self: &Self) -> Option<Rc<dyn IDisposable>>
Tries to take the lock. Returns the disposable that releases it if the lock was obtained.
lock
fn lock(self: &Self) -> Rc<dyn IDisposable>
Enters a waiting lock.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.