(queue, pollingInterval, pollIndex, chunkSize)
| 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: |
no test coverage detected
searching dependent graphs…