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

Method onTimeout

src/extraction/parse-pool.ts:369–376  ·  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

367 * and arm the hard-kill backstop for workers that are genuinely hung.
368 */
369 private onTimeout(w: ParsePoolWorker, job: ParseJob, ms: number): void {
370 if (job.settled || !this.workers.has(w)) return;
371 const graceMs = ms * (HARD_KILL_MULTIPLIER - 1);
372 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`);
373 job.timerExpired = true;
374 job.hardKillTimer = setTimeout(() => this.onHardTimeout(w, job, ms * HARD_KILL_MULTIPLIER), graceMs);
375 job.hardKillTimer.unref?.();
376 }
377
378 /** No result after the full hard-kill window — the worker really is hung. */
379 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