MCPcopy Index your code
hub / github.com/colbymchenry/codegraph / resolveParsePoolSize

Function resolveParsePoolSize

src/extraction/parse-pool.ts:87–96  ·  view source on GitHub ↗
(envVal: string | undefined, cpuCount: number)

Source from the content-addressed store, hash-verified

85 * the main thread + UI; never zero — parsing always needs a worker).
86 */
87export function resolveParsePoolSize(envVal: string | undefined, cpuCount: number): number {
88 if (envVal !== undefined && envVal !== '') {
89 const n = Number(envVal);
90 if (Number.isFinite(n) && n >= 0) {
91 return Math.max(1, Math.min(Math.floor(n), MAX_PARSE_POOL_SIZE));
92 }
93 // non-numeric / negative → fall through to the default
94 }
95 return Math.max(1, Math.min(cpuCount - 1, DEFAULT_PARSE_POOL_CAP));
96}
97
98interface ParseJob {
99 id: number;

Callers 2

indexAllMethod · 0.90
parse-pool.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected