[][src]Struct tarantool_module::fiber::Latch

pub struct Latch { /* fields omitted */ }

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 - success
  • None - the latch is locked.

Trait Implementations

impl Drop for Latch[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.