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

Function onAbort

lib/internal/streams/iter/broadcast.js:722–728  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

720
721function wireBroadcastWriteSignal(entry, signal, resolve, reject, self) {
722 const onAbort = () => {
723 const pendingWrites = getBroadcastPendingWrites(self);
724 const idx = pendingWrites.indexOf(entry);
725 if (idx !== -1) pendingWrites.removeAt(idx);
726 entry.chunk = null;
727 reject(signal.reason ?? lazyDOMException('Aborted', 'AbortError'));
728 };
729 entry.resolve = function() {
730 signal.removeEventListener('abort', onAbort);
731 entry.chunk = null;

Callers 4

abortableNextFunction · 0.70
constructorMethod · 0.50
[SymbolAsyncIterator]Method · 0.50

Calls 4

lazyDOMExceptionFunction · 0.85
rejectFunction · 0.70
indexOfMethod · 0.45
removeAtMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…