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

Function cancel2Algorithm

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

Source from the content-addressed store, hash-verified

1062 return cancelPromise.promise;
1063 }
1064 function cancel2Algorithm(reason) {
1065 canceled2 = true;
1066 reason2 = reason;
1067 if (canceled1 === true) {
1068 const compositeReason = [reason1, reason2];
1069 const cancelResult = ReadableStreamCancel(stream, compositeReason);
1070 resolvePromise(cancelPromise, cancelResult);
1071 }
1072 return cancelPromise.promise;
1073 }
1074 function startAlgorithm() {
1075 }
1076 branch1 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel1Algorithm);

Callers

nothing calls this directly

Calls 2

ReadableStreamCancelFunction · 0.85
resolvePromiseFunction · 0.85

Tested by

no test coverage detected