module
pool
ion7.llm.pool.Slot
ion7.llm.Pool
Functions
Pool.new
Build a pool.
Pool:add
Register a session into the pool. Prefills it through the context manager, samples the first token, and queues it for the next tick.
Pool:slots
Snapshot of the slot list. Returns the live array — do not mutate.
Pool:n_active
Number of slots that have not yet hit a stop condition.
Pool:tick
Execute one parallel decode step. Returns true when at least one slot was processed, false when every slot has already terminated.
Pool:run
Drive every slot to completion. Calls `tick` in a loop, then runs `:_finalise` on each slot so `slot.session:last_response()` is ready to read.
Pool:reset
Drop every slot. Sessions are NOT released — the caller decides whether to keep them around for the next round of chat.
Pool:free
Free the pool's batch immediately. Idempotent.