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

Method createPool

src/resolution/index.ts:1569–1584  ·  view source on GitHub ↗
(t0: number, why: string)

Source from the content-addressed store, hash-verified

1567 // declined.
1568 let poolEngageTried = false;
1569 const createPool = (t0: number, why: string): ResolverPool | null => {
1570 poolEngageTried = true;
1571 if (!parallel) return null;
1572 const p = ResolverPool.tryCreate(parallel.dbPath, this.projectRoot);
1573 p?.ready().then(
1574 () => {
1575 poolReady = true;
1576 if (process.env.CODEGRAPH_SYNTH_TIMINGS) console.error(`[pool-timing] pool ready after ${Date.now() - t0}ms (${why})`);
1577 },
1578 () => {
1579 void p.destroy().catch(() => undefined);
1580 if (pool === p) pool = null;
1581 }
1582 );
1583 return p;
1584 };
1585 if (parallel && total >= minRefsForPool()) {
1586 pool = createPool(Date.now(), 'ref-count');
1587 }

Callers

nothing calls this directly

Calls 4

tryCreateMethod · 0.80
errorMethod · 0.80
readyMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected