Closed reillyeon closed 2 years ago
This specifies the behavior implemented in https://chromium-review.googlesource.com/c/chromium/src/+/3366788 and so resolves an issue which has been confusing me for awhile about one of the tests I wrote for aborting a stream while there was a write pending. This doesn't add any steps to closeAlgorithm but as implemented this would also unblock a close() as well.
While you're adding better hooks I noticed that "set up" doesn't take a startAlgorithm and that would be a better place to add abort steps than every time writeAlgorithm is invoked.
Oh, the intention was that startAlgorithm wasn't needed since you could just do that yourself as a sibling step of "set up". I think that works, if I expose "stream's signal"?
Oh, the intention was that startAlgorithm wasn't needed since you could just do that yourself as a sibling step of "set up". I think that works, if I expose "stream's signal"?
That's an excellent point.
When controller.signal is aborted, abort the current write operation so that the stream can close more quickly.
Partially resolves #152.