Get group
New to the concept? See Tools — Pool first.
get
- Non-blocking acquisition.
- Calls
on_gethook. - Moves the handle —
slot.*set to non-null on success. - Assert:
slot.* == null- Pool initialized.
- Tag registered.
get_wait
pub fn get_wait(self: *Pool, tag: *const anyopaque, slot: *Slot, timeout_ns: ?u64) (Pool.GetError || Cancelable || error{Timeout})!void
- Blocking acquisition.
nulltimeout = wait forever.timeout_ns = 0returnserror.Timeoutimmediately.- Logically equivalent to
get(.available_only), but a different error (error.Timeoutvserror.NotAvailable). - Intentional:
get_waitalways uses the timeout error set, regardless of the timeout value. - Calls
on_gethook. - Assert:
slot.* == null- Pool initialized.
- Tag registered.