MCPcopy Create free account
hub / github.com/clientdb/clientdb / add

Function add

core/utils/pushQueue.ts:101–109  ·  view source on GitHub ↗
(task: Task<T>)

Source from the content-addressed store, hash-verified

99 }
100
101 async function add<T>(task: Task<T>) {
102 queue.add(task);
103 const flushPromise = createResolvablePromise<T>();
104 taskFlushedPromisesMap.set(task, flushPromise);
105
106 scheduleNext();
107
108 return flushPromise.promise;
109 }
110
111 async function waitForFlush() {
112 const allPromises = Array.from(queue).map((task) => {

Callers

nothing calls this directly

Calls 3

createResolvablePromiseFunction · 0.90
scheduleNextFunction · 0.85
addMethod · 0.80

Tested by

no test coverage detected