Io module

Fiber_Mutex

structSource

A lock for fibers. A fiber that cannot take it waits without blocking the thread, so unlike Thread's Mutex it is safe to hold across a sleep or a channel operation. It is not recursive, and waiters get it in the order they asked.

Fields

locked: bool
waiters: Waiter

See also