MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / destroy

Method destroy

src/resolution/resolver-pool.ts:322–338  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

320 }
321
322 async destroy(): Promise<void> {
323 await Promise.all(
324 this.workers.map(
325 (pw) =>
326 new Promise<void>((resolve) => {
327 const t = setTimeout(() => {
328 void pw.worker.terminate().then(() => resolve());
329 }, 5000);
330 pw.worker.once('exit', () => {
331 clearTimeout(t);
332 resolve();
333 });
334 pw.worker.postMessage({ type: 'close' });
335 })
336 )
337 );
338 }
339}

Callers 3

createPoolMethod · 0.45
settleBatchMethod · 0.45

Calls 4

allMethod · 0.65
terminateMethod · 0.65
postMessageMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected