drained: true means all in-flight work and pending waiters
completed within the deadline (inFlight/pending are then 0).
drained: false means the deadline elapsed first; inFlight and
pending report what was still outstanding at that moment. inFlight
includes token-holding LLM admissions whose borrowed local concurrency
slot has already been abandoned but whose token has not been released.
Result of
drain({ timeoutMs })(v3.8).drained: truemeans all in-flight work and pending waiters completed within the deadline (inFlight/pendingare then 0).drained: falsemeans the deadline elapsed first;inFlightandpendingreport what was still outstanding at that moment.inFlightincludes token-holding LLM admissions whose borrowed local concurrency slot has already been abandoned but whose token has not been released.