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

Method beginBatch

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

Source from the content-addressed store, hash-verified

1631 // Sequential batches stay lazy: they run on the main thread at settle
1632 // time, where an early start would only contend with the persist.
1633 const beginBatch = (batch: UnresolvedReference[]): InFlight => {
1634 if (pool && poolReady && ResolverPool.worthParallel(batch.length)) {
1635 return {
1636 mode: 'pool',
1637 settled: pool.resolveBatch(batch).then(
1638 (out) => ({ ok: true as const, out }),
1639 (err: unknown) => ({ ok: false as const, err })
1640 ),
1641 };
1642 }
1643 return { mode: 'seq' };
1644 };
1645
1646 // Settle an in-flight batch to a ResolutionResult. Deferred post-pass refs
1647 // 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