Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/yxz/async/queue.ts>AsyncQueue#onIdle

Deno Standard Extensions
Go to Latest
method AsyncQueue.prototype.onIdle
import { AsyncQueue } from "https://deno.land/x/yxz@0.17.0/async/queue.ts";

The difference with .onEmpty is that .onIdle guarantees that all work from the queue has finished. .onEmpty merely signals that the queue is empty, but it could mean that some promises haven't completed yet

Returns

Promise<void>

A promise that settles when the queue becomes empty, and all promises have completed; queue.size === 0 && queue.pending === 0.