[whatwg/streams] Do not allow abort() to interrupt a closing writable stream? (#632)

I thought this would have been taken care of by https://github.com/whatwg/streams/commit/591a6eda9ea0b84881a370519d6aca53fab9e256, but it seems like there is a subtle difference between "closing" (a close request has been queued) and [[inClose]] === true (underlying sink close() is executing).

I am wondering if we can remove the wart currently noted as

> Due to the way writable streams asynchronously close, it is possible for both close and abort to be called, in cases where the producer aborts the stream while it is in the "closing" state. Notably, since a stream always spends at least one turn in the "closing" state, code like ws.close(); ws.abort(...); will cause both to be called, even if the close method itself has no asynchronous behavior. A well-designed underlying sink object should be able to deal with this. 

I started some work on this in https://github.com/whatwg/streams/tree/close-then-abort but my method of doing so broke the requirement that close() not happen before start() finishes. I think there might be another better method, but it's not clear to me what it is quite yet...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/632

Received on Friday, 16 December 2016 23:12:01 UTC