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

Method onTimeout

src/extraction/parse-pool.ts:472–479  ·  view source on GitHub ↗

* The base timer fired with no result processed yet. Do NOT kill or settle: * the timer firing doesn't prove the parse is still running — after a long * synchronous main-thread stretch Node services the timers phase before the * poll phase, so an already-delivered `parse-result` is still qu

(w: ParsePoolWorker, job: ParseJob, ms: number)

Source from the content-addressed store, hash-verified

470 * and arm the hard-kill backstop for workers that are genuinely hung.
471 */
472 private onTimeout(w: ParsePoolWorker, job: ParseJob, ms: number): void {
473 if (job.settled || !this.workers.has(w)) return;
474 const graceMs = ms * (HARD_KILL_MULTIPLIER - 1);
475 this.log(`TIMEOUT: ${job.task.filePath} exceeded ${ms}ms with no result — waiting up to ${graceMs}ms more for a late result before killing the worker`);
476 job.timerExpired = true;
477 job.hardKillTimer = setTimeout(() => this.onHardTimeout(w, job, ms * HARD_KILL_MULTIPLIER), graceMs);
478 job.hardKillTimer.unref?.();
479 }
480
481 /** No result after the full hard-kill window — the worker really is hung. */
482 private onHardTimeout(w: ParsePoolWorker, job: ParseJob, totalMs: number): void {

Callers 1

dispatchMethod · 0.95

Calls 2

onHardTimeoutMethod · 0.95
hasMethod · 0.80

Tested by

no test coverage detected