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

> Does your proposal #617 (comment) imply removal of the fallback? It's replaced with allowing developers to make shutdown no-op, and ignore the first argument why and do one common thing in destroy()?

Yes. I expect that implementing only `destroy()` and ignoring both arguments would be the most common pattern. You'd only implement `shutdown()` if you had data to flush or your sink had some concept of clean shutdown. For example with WebSockets, `shutdown()` would send the Close frame and wait for the response. `destroy()` would then close the socket.

> I agree this is an important point and analogy with the finally clause makes me also rethink it carefully.

Actually, `finally()` might be a better name than `destroy()`.

Having said that, I'm not seriously pushing my proposal. I think @domenic has provided a good path forward with the existing API, and I don't think it's worth giving it up in exchange for something of doubtful benefit.

-- 
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#issuecomment-262729169

Received on Thursday, 24 November 2016 09:28:22 UTC