pub fn wait(s: *Semaphore, io: Io) Io.Cancelable!void
Blocks until a permit is available and consumes a single one. Unblocks without consuming a permit when canceled.
permit
See also:
waitTimeout
waitUncancelable
s: *Semaphore
io: Io
22 23 24 25 26 27
pub fn wait(s: *Semaphore, io: Io) Io.Cancelable!void { s.waitTimeout(io, .none) catch |err| switch (err) { error.Timeout => unreachable, error.Canceled => |e| return e, }; }
Blocks until a
permitis available and consumes a single one. Unblocks without consuming apermitwhen canceled.See also:
waitTimeoutwaitUncancelable