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

Function setupBlockingTask

src/pkg/utils/async_queue.test.ts:19–25  ·  view source on GitHub ↗
(key: any)

Source from the content-addressed store, hash-verified

17
18/** 为 key 设置一个「永远阻塞」的任务,供手动放行 */
19const setupBlockingTask = (key: any) => {
20 const gate = deferred<void>();
21 stackAsyncTask(key, async () => {
22 await gate.promise; // 直到 gate.resolve()
23 });
24 return gate;
25};
26
27/* ==================== 测试套件 ==================== */
28

Callers 1

Calls 2

deferredFunction · 0.90
stackAsyncTaskFunction · 0.90

Tested by

no test coverage detected