Rust

semaphore

Module

In-process locks: a Semaphore for a bounded number of holders and a Mutex for one.

Contents

use utopia_lock::Mutex;
Rust
pub struct Mutex(Semaphore)

One holder at a time, within one process.

Also implements Default.
use utopia_lock::Semaphore;
Rust
pub struct Semaphore

At most permits holders at a time, within one process.