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

Method onAbort

lib/internal/vfs/watcher.js:621–629  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

619 // Handle abort signal - reject pending next() with AbortError
620 if (signal) {
621 const onAbort = () => {
622 this.#closed = true;
623 const err = new AbortError(undefined, { cause: signal.reason });
624 while (this.#pendingResolvers.length > 0) {
625 const { reject } = this.#pendingResolvers.shift();
626 reject(err);
627 }
628 this.#watcher.close();
629 };
630 if (signal.aborted) {
631 onAbort();
632 } else {

Callers

nothing calls this directly

Calls 3

closeMethod · 0.65
rejectFunction · 0.50
shiftMethod · 0.45

Tested by

no test coverage detected