Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

Deno Standard Extensions
Latest
method AsyncQueue.prototype.onIdle
import { AsyncQueue } from "https://deno.land/x/yxz@0.32.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.