MCPcopy Create free account
hub / github.com/Kong/insomnia / waitUntilDone

Method waitUntilDone

packages/insomnia/src/sync/git/sync-queue.ts:46–52  ·  view source on GitHub ↗

* Returns a promise that resolves once all currently-enqueued tasks (including * any tasks they enqueue during execution) have completed. * * If the queue is idle, resolves immediately.

()

Source from the content-addressed store, hash-verified

44 * If the queue is idle, resolves immediately.
45 */
46 async waitUntilDone(): Promise<void> {
47 let snapshot: Promise<void>;
48 do {
49 snapshot = this.tail;
50 await snapshot;
51 } while (snapshot !== this.tail);
52 }
53
54 /**
55 * Stop the queue. Pending tasks are skipped and future `enqueue()` calls are

Callers 3

flushNowMethod · 0.80
importAllFilesMethod · 0.80
sync-queue.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected