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.
stopped (v3.18) is present only when the call passed
stopOnTimeout: true: the number of admitted calls the deadline stopped.
A stopped call still counts in inFlight until its callback settles or
its acquire() token is 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.stopped(v3.18) is present only when the call passedstopOnTimeout: true: the number of admitted calls the deadline stopped. A stopped call still counts ininFlightuntil its callback settles or itsacquire()token is released.