MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / cancel1Algorithm

Function cancel1Algorithm

examples/io/streams/modules/streams.js:1054–1063  ·  view source on GitHub ↗
(reason)

Source from the content-addressed store, hash-verified

1052 return Promise.resolve(undefined);
1053 }
1054 function cancel1Algorithm(reason) {
1055 canceled1 = true;
1056 reason1 = reason;
1057 if (canceled2 === true) {
1058 const compositeReason = [reason1, reason2];
1059 const cancelResult = ReadableStreamCancel(stream, compositeReason);
1060 resolvePromise(cancelPromise, cancelResult);
1061 }
1062 return cancelPromise.promise;
1063 }
1064 function cancel2Algorithm(reason) {
1065 canceled2 = true;
1066 reason2 = reason;

Callers

nothing calls this directly

Calls 2

ReadableStreamCancelFunction · 0.85
resolvePromiseFunction · 0.85

Tested by

no test coverage detected