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

Method runSynthPass

src/resolution/resolver-pool.ts:274–283  ·  view source on GitHub ↗

* Run one synthesis pass (by SYNTH_PASSES name) on the least-busy worker. * The worker reads the committed graph on its own connection and returns * the pass's edge list; the caller merges in canonical order. Rejects on * worker failure — the caller retries the pass on the main thread.

(passName: string)

Source from the content-addressed store, hash-verified

272 * worker failure — the caller retries the pass on the main thread.
273 */
274 async runSynthPass(passName: string): Promise<SynthPassResult> {
275 if (this.failed) throw this.failed;
276 const id = this.nextId++;
277 const pw = this.workers.reduce((a, b) => (b.busy < a.busy ? b : a));
278 pw.busy++;
279 return new Promise<SynthPassResult>((resolve, reject) => {
280 this.synthWaiters.set(id, { resolve, reject });
281 pw.worker.postMessage({ type: 'synth', id, pass: passName });
282 });
283 }
284
285 /**
286 * Ask every worker to close and reopen its read-only connection, and wait

Callers 1

synthesizeCallbackEdgesFunction · 0.80

Calls 2

postMessageMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected