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

Function finalize

lib/internal/webstreams/readablestream.js:1498–1507  ·  view source on GitHub ↗
(rejected, error)

Source from the content-addressed store, hash-verified

1496 // tells us that the promise must be rejected even
1497 // when error is undefine.
1498 function finalize(rejected, error) {
1499 writableStreamDefaultWriterRelease(writer);
1500 readableStreamReaderGenericRelease(reader);
1501 if (signal !== undefined)
1502 disposable?.[SymbolDispose]();
1503 if (rejected)
1504 promise.reject(error);
1505 else
1506 promise.resolve();
1507 }
1508
1509 async function waitForCurrentWrite() {
1510 const write = state.currentWrite;

Callers 3

shutdownWithAnActionFunction · 0.70
completeFunction · 0.70
shutdownFunction · 0.70

Calls 4

rejectMethod · 0.80
resolveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…