MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / run

Function run

src/pkg/utils/async_queue.test.ts:285–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

283 const final = deferred<number>();
284 let count = 0;
285 const run = async (): Promise<number> => {
286 const id = ++count;
287 order.push(id);
288 if (id < 5) stackAsyncTask(kRecur, run);
289 else order.push(await final.promise);
290 return id;
291 };
292
293 const pRecur = stackAsyncTask(kRecur, run);
294 await flush();

Callers

nothing calls this directly

Calls 2

stackAsyncTaskFunction · 0.90
pushMethod · 0.80

Tested by

no test coverage detected