File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -625,9 +625,21 @@ enum ReadableStreamType { "bytes" };
625625 example [[#example-rs-push-no-backpressure]] .
626626
627627 <p> If the shutdown process is asynchronous, it can return a promise to signal success or failure;
628- the result will be communicated via the return value of the <code> cancel()</code>
629- method that was called. Additionally, a rejected promise will error the stream, instead of
630- letting it close. Throwing an exception is treated the same as returning a rejected promise.
628+ the result will be communicated via the return value of the <code> cancel()</code> method that was
629+ called. Throwing an exception is treated the same as returning a rejected promise.
630+
631+ <div class="note">
632+ <p> Even if the cancelation process fails, the stream will still close; it will not be put into
633+ an errored state. This is because a failure in the cancelation process doesn't matter to the
634+ consumer's view of the stream, once they've expressed disinterest in it by canceling. The
635+ failure is only communicated to the immediate caller of the corresponding method.
636+
637+ <p> This is different from the behavior of the {{UnderlyingSink/close}} and
638+ {{UnderlyingSink/abort}} options of a {{WritableStream}} 's [=underlying sink=] , which upon
639+ failure put the corresponding {{WritableStream}} into an errored state. Those correspond to
640+ specific actions the [=producer=] is requesting and, if those actions fail, they indicate
641+ something more persistently wrong.
642+ </div>
631643
632644 <dt> <dfn dict-member for="UnderlyingSource" lt="type"><code>type</code></dfn> (byte streams
633645 only)</dt>
You can’t perform that action at this time.
0 commit comments