API Reference — Pool — control
New to the concept? See Building Blocks — Pool first.
init
- Registers hooks.
- Called once after
new. - Assert:
pool.is_it_you(ph.*.tag)- Hooks tags not empty, each tag not null.
- Pool not already closed.
close
- Can be called more than once.
- Collects all handles from all per-tag free-lists.
- Calls
on_closeonce with the full list. - Broadcasts to wake blocked
get_waitcallers. - Assert:
pool.is_it_you(ph.*.tag)
destroy
- Frees the pool.
- Must be closed first.
- Calling destroy on an open pool is a programming error (panic).
- Assert:
pool.is_it_you(ph.*.tag)
is_it_you
- Returns true if tag identifies a PoolHandle.
Next: Error sets.