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

Method createPool

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

Source from the content-addressed store, hash-verified

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

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