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

Method beginBatch

src/resolution/index.ts:1625–1636  ·  view source on GitHub ↗
(batch: UnresolvedReference[])

Source from the content-addressed store, hash-verified

1623 // Sequential batches stay lazy: they run on the main thread at settle
1624 // time, where an early start would only contend with the persist.
1625 const beginBatch = (batch: UnresolvedReference[]): InFlight => {
1626 if (pool && poolReady && ResolverPool.worthParallel(batch.length)) {
1627 return {
1628 mode: 'pool',
1629 settled: pool.resolveBatch(batch).then(
1630 (out) => ({ ok: true as const, out }),
1631 (err: unknown) => ({ ok: false as const, err })
1632 ),
1633 };
1634 }
1635 return { mode: 'seq' };
1636 };
1637
1638 // Settle an in-flight batch to a ResolutionResult. Deferred post-pass refs
1639 // are appended HERE, in loop order — never inside the fan-out promise — so

Callers

nothing calls this directly

Calls 2

worthParallelMethod · 0.80
resolveBatchMethod · 0.80

Tested by

no test coverage detected