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

Method createPool

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

Source from the content-addressed store, hash-verified

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

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