MCPcopy Index your code
hub / github.com/nodejs/node / #startPolling

Method #startPolling

lib/internal/vfs/watcher.js:116–125  ·  view source on GitHub ↗

* Starts the polling timer.

()

Source from the content-addressed store, hash-verified

114 * Starts the polling timer.
115 */
116 #startPolling() {
117 if (this.#closed) return;
118
119 this.#timer = setInterval(() => this.#poll(), this.#interval);
120
121 // If not persistent, unref the timer to allow process to exit
122 if (!this.#persistent && this.#timer.unref) {
123 this.#timer.unref();
124 }
125 }
126
127 /**
128 * Polls for changes.

Callers 1

constructorMethod · 0.95

Calls 3

#pollMethod · 0.95
setIntervalFunction · 0.50
unrefMethod · 0.45

Tested by

no test coverage detected