Thread-safe async/await lock. Functions which are waiting for the lock are suspended, and are resumed when the lock is released, in order. Allows only one actor to hold the lock. TODO: make this API also work in blocking I/O mode.

Fields

mutex: std.Thread.Mutex = .{ },
head: usize = UNLOCKED,

Types

Functions

fn acquire(self: *Lock) Held

No documentation provided.

fn initLocked() Lock

No documentation provided.