A lock.
struct Lock {
/* private fields */
}| Name | Description |
|---|---|
| new | Creates a new, unlocked, lock. |
| Receiver | Name | Description |
|---|---|---|
&self | lock | Locks the lock by sleeping until the lock is unlocked if it's currently locked. |
&self | status | Returns the status of the lock. |
&self | try_lock | Tries to lock the lock if it's currently unlocked. |
| Name | Description |
|---|---|
| Eq | Objects that implement the binary |
| UndefState | Types that are not valid when they contain certain bit patterns. |
This lock can be used for inter-process synchronization.