Re: [whatwg/streams] ReadableStream should be an async iterable (#778)

@devsnek has generously volunteered to help with the spec and tests here, and I'm very excited. Summing up some IRC discussion:

- I think we should have auto-release. There's no reason for any consumer to forever hold a lock and not have any way of giving it back, even if the stream is definitely closed. At least in tests we often check whether something's errored or closed by doing `.getReader().closed.then(...)`; we shouldn't break that, I think.
- I agree with auto-cancel as the default return() behavior. I like @jakearchibald's idea of `.iterator({ preventCancel: true })` as a way of customizing. (Jake said "preventClose", but "preventCancel" is more accurate, unless I'm missing something.)

-- 
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/778#issuecomment-413610478

Received on Thursday, 16 August 2018 16:45:18 UTC