Re: [whatwg/streams] Assert there are no pending reads when releasing lock (#1168)

It works perfectly for `pipeTo()`! 😁 We already do `setPromiseIsHandledToTrue(pipeLoop())`, so any rejected `read()`s within the loop will stop the loop but not cause additional rejections.

Of course we'll need to update some other tests that expect `releaseLock()` to throw when there are pending reads (and instead expect it to reject those reads), but that's feasible.

However we still need to figure out what to do with the pending pull-into descriptors when calling `byobReader.releaseLock()`, see [my other comment](https://github.com/whatwg/streams/issues/1103#issuecomment-932763919). 🤔

-- 
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/pull/1168#issuecomment-943795223

Received on Thursday, 14 October 2021 22:45:41 UTC