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

> Perhaps a dumb question, but maybe the tests indicate that we should allow releasing the lock even with pending read requests?

That's also a possibility.

I wouldn't want to leave the `read()` promises pending though, so I'd say `reader.releaseLock()` must reject all pending read requests with an `AbortError`. Or perhaps a `TypeError`, to align with how we reject `reader.closed`? 🤔

So basically `releaseLock()` becomes what `controller.abort()` would have done for the originally proposed `getReader({ signal: controller.signal })`.

-- 
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-941576500

Received on Tuesday, 12 October 2021 21:18:21 UTC