MCPcopy Create free account
hub / github.com/arctic-cli/interface / check

Function check

packages/arctic/src/util/eventloop.ts:6–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4 export async function wait() {
5 return new Promise<void>((resolve) => {
6 const check = () => {
7 const active = [...(process as any)._getActiveHandles(), ...(process as any)._getActiveRequests()]
8 Log.Default.info("eventloop", {
9 active,
10 })
11 if ((process as any)._getActiveHandles().length === 0 && (process as any)._getActiveRequests().length === 0) {
12 resolve()
13 } else {
14 setImmediate(check)
15 }
16 }
17 check()
18 })
19 }

Callers 1

waitFunction · 0.85

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected