waitForEmptyQueue

suspend fun waitForEmptyQueue(timeoutMs: Long? = null): Boolean

Suspend until the queue is empty AND no agent is currently being awaited, or until timeoutMs elapses. Returns true if the queue drained, false on timeout.