MCPcopy Create free account
hub / github.com/Snapchat/Valdi / flushTasks

Method flushTasks

compiler/companion/src/utils/SerialTaskQueue.ts:42–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40 }
41
42 private flushTasks() {
43 if (this.ready && this.pendingTasks.length) {
44 const operation = this.pendingTasks.shift()!;
45 this.ready = false;
46 operation(() => {
47 this.ready = true;
48 this.flushTasks();
49 });
50 }
51 }
52}

Callers 1

doEnqueueTaskMethod · 0.95

Calls 1

shiftMethod · 0.45

Tested by

no test coverage detected