Repository navigation
pool 0.1.1
Needs Agentica 0.31.0.
Changed
- With
lease_msabove 0,checkoutruns in the task of the body, not in a task of its own, so a check costs no task. The caller still waits at most 5 seconds for it, and acheckoutthat refuses, crashes or hangs still ends the resource without reaching the caller, which gets the next resource at its place in line. - A body that runs in a task of the pool does not start when the drain of a close ended while its
checkoutran, also when the owner is still running (another resource in a slowinit): the caller getspool error: closed. The 5 seconds that a caller waits forcheckouthold for one that waits (a sleep, a channel, I/O, acompute def), not for one that blocks in a plain nativedefcall. closereturns after the last count is written:waitingandliveare 0 when it returns.
Documented
checkinruns at most once for each body that ran (the 0.1.0 entry said once): a caller cancelled withlease_ms0 after it told the pool it is checking in, and before itscheckinstarts, has its resource ended with nocheckin.- A
terminatethat never returns holds its place and the pool does not replace the resource, so each one makes the pool one resource smaller;terminateruns in the keeper, which owns the handles, so it cannot be bounded with a task.