[whatwg/streams] Note about underlyingSink close() method is misleading (#617)

https://streams.spec.whatwg.org/#ref-for-underlying-sink-10

> The stream implementation guarantees that this method will be called only after all queued\-up writes have succeeded\.

Except if abort() is not defined on the underlyingSink, and user code calls abort(). In that case close() can be called concurrently with write(), possibly wreaking havoc with the assumptions of the author of the underlyingSink.

I would prefer if this note included a qualification like "except when abort() is called, as mentioned below".

close() can also be called while an existing async call to close() is already in progress, but that might be a spec bug.

-- 
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/617

Received on Monday, 21 November 2016 10:43:13 UTC