Struct lrs::sync::Lock

A lock.

Syntax

struct Lock {
    /* private fields */
}

Static methods

NameDescription
new

Creates a new, unlocked, lock.

Methods

ReceiverNameDescription
&selflock

Locks the lock by sleeping until the lock is unlocked if it's currently locked.

&selfstatus

Returns the status of the lock.

&selftry_lock

Tries to lock the lock if it's currently unlocked.

Trait implementations

NameDescription
Eq

Objects that implement the binary == and != operators.

UndefState

Types that are not valid when they contain certain bit patterns.

Remarks

This lock can be used for inter-process synchronization.