MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / schedulePoll

Function schedulePoll

packages/node/src/backend/nodeBackendInline.ts:370–384  ·  view source on GitHub ↗
(delayMs: number)

Source from the content-addressed store, hash-verified

368 }
369
370 function schedulePoll(delayMs: number): void {
371 if (!started || disposed || stopRequested || fatal !== null) return;
372 if (pollImmediate !== null || pollTimer !== null) return;
373 if (delayMs <= 0) {
374 pollImmediate = setImmediate(() => {
375 pollImmediate = null;
376 runPollOnce();
377 });
378 return;
379 }
380 pollTimer = setTimeout(() => {
381 pollTimer = null;
382 runPollOnce();
383 }, delayMs);
384 }
385
386 function buildBatch(buf: ArrayBuffer, byteLen: number, dropped: number): BackendEventBatch {
387 const bytes = new Uint8Array(buf, 0, byteLen);

Callers 3

runPollOnceFunction · 0.85
startFunction · 0.85
pollEventsFunction · 0.85

Calls 1

runPollOnceFunction · 0.85

Tested by

no test coverage detected