[−][src]Struct tarantool_module::fiber::Latch
A lock for cooperative multitasking environment
Implementations
impl Latch
[src]
pub fn new() -> Self
[src]
Allocate and initialize the new latch.
pub fn lock(&self) -> LatchGuard<'_>
[src]
Lock a latch. Waits indefinitely until the current fiber can gain access to the latch.
pub fn try_lock(&self) -> Option<LatchGuard<'_>>
[src]
Try to lock a latch. Return immediately if the latch is locked.
Returns:
Some
- successNone
- the latch is locked.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Latch
impl !Send for Latch
impl !Sync for Latch
impl Unpin for Latch
impl UnwindSafe for Latch
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,