MCPcopy Create free account
hub / github.com/anthropics/claude-code / endOverdueRest

Function endOverdueRest

mods/diff/hooks/register.ts:533–548  ·  view source on GitHub ↗

* Ends a wait whose time has passed but whose timer never fired because the * host refused it, so a refused timer cannot hold reads for the whole * session. * * @param engine the bound host

(engine: Host)

Source from the content-addressed store, hash-verified

531 * @param engine the bound host
532 */
533 async function endOverdueRest(engine: Host) {
534 const timer = timers.get('rest')
535 const dueMs = restDueMs
536 const nowMs = await engine.now().catch(() => null)
537
538 const isOverdue =
539 timer !== undefined &&
540 timers.get('rest') === timer &&
541 dueMs !== null &&
542 nowMs !== null &&
543 nowMs >= dueMs
544
545 if (isOverdue) {
546 endRest(engine)
547 }
548 }
549
550 /**
551 * Starts the read kept while a read ran or a wait held it: at once if it

Callers 3

startPollFunction · 0.85
refreshFunction · 0.85
openOnFirstEditFunction · 0.85

Calls 2

endRestFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected