(t0: number, why: string, worth?: number)
| 2766 | // declined. |
| 2767 | let poolEngageTried = false; |
| 2768 | const createPool = (t0: number, why: string, worth?: number): ResolverPool | null => { |
| 2769 | poolEngageTried = true; |
| 2770 | if (!parallel) return null; |
| 2771 | const p = ResolverPool.tryCreate(parallel.dbPath, this.projectRoot, parallel.shareFrameworks ? this.getDetectedFrameworks() : undefined, worth); |
| 2772 | if (p && parallel.shareFrameworks) { |
| 2773 | const scans = this.projectScans(); |
| 2774 | if (process.env.CODEGRAPH_SYNTH_TIMINGS) console.error(`[pool-timing] project scans: ${scans.cpp ? 'shared' : 'none'}`); |
| 2775 | if (scans.cpp) p.shareScans(scans); |
| 2776 | } |
| 2777 | p?.ready().then( |
| 2778 | () => { |
| 2779 | poolReady = true; |
| 2780 | if (process.env.CODEGRAPH_SYNTH_TIMINGS) console.error(`[pool-timing] pool ready after ${Date.now() - t0}ms (${why})`); |
| 2781 | }, |
| 2782 | () => { |
| 2783 | void p.destroy().catch(() => undefined); |
| 2784 | if (pool === p) pool = null; |
| 2785 | } |
| 2786 | ); |
| 2787 | return p; |
| 2788 | }; |
| 2789 | if (parallel && total >= minRefsForPool()) { |
| 2790 | pool = createPool(Date.now(), 'ref-count'); |
| 2791 | if (pool) await poolStartSettled(pool.ready()); |
nothing calls this directly
no test coverage detected