MCPcopy Index your code
hub / github.com/nodejs/node / pollQueue

Function pollQueue

test/fixtures/snapshot/typescript.js:6306–6332  ·  view source on GitHub ↗
(queue, pollingInterval, pollIndex, chunkSize)

Source from the content-addressed store, hash-verified

6304 }
6305 }
6306 function pollQueue(queue, pollingInterval, pollIndex, chunkSize) {
6307 return pollWatchedFileQueue(host, queue, pollIndex, chunkSize, onWatchFileStat);
6308 function onWatchFileStat(watchedFile, pollIndex, fileChanged) {
6309 if (fileChanged) {
6310 watchedFile.unchangedPolls = 0;
6311 // Changed files go to changedFilesInLastPoll queue
6312 if (queue !== changedFilesInLastPoll) {
6313 queue[pollIndex] = undefined;
6314 addChangedFileToLowPollingIntervalQueue(watchedFile);
6315 }
6316 }
6317 else if (watchedFile.unchangedPolls !== ts.unchangedPollThresholds[pollingInterval]) {
6318 watchedFile.unchangedPolls++;
6319 }
6320 else if (queue === changedFilesInLastPoll) {
6321 // Restart unchangedPollCount for unchanged file and move to low polling interval queue
6322 watchedFile.unchangedPolls = 1;
6323 queue[pollIndex] = undefined;
6324 addToPollingIntervalQueue(watchedFile, PollingInterval.Low);
6325 }
6326 else if (pollingInterval !== PollingInterval.High) {
6327 watchedFile.unchangedPolls++;
6328 queue[pollIndex] = undefined;
6329 addToPollingIntervalQueue(watchedFile, pollingInterval === PollingInterval.Low ? PollingInterval.Medium : PollingInterval.High);
6330 }
6331 }
6332 }
6333 function pollingIntervalQueue(pollingInterval) {
6334 switch (pollingInterval) {
6335 case PollingInterval.Low:

Callers 2

pollPollingIntervalQueueFunction · 0.85

Calls 2

pollWatchedFileQueueFunction · 0.85
scheduleNextPollFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…