Re: [whatwg/streams] pipeTo: Read fulfilled after shutdown started (Issue #1207)

Would it also work to check if dest.[[state]] is "errored" before doing any reads from source?

It's unfortunate that both that solution (if it works) and the error callbacks one would make pipeTo unimplementable using public APIs. It was always a nice story that pipeTo was a higher-level combinator and the fundamental reader/writer APIs had just as much power. But maybe we have already crossed that bridge; I'm not sure...

I can't really see a way around it, though, at least with the current set of public APIs. The problem of those in-between microtasks seems pretty fundamental.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/1207#issuecomment-1015851512
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/streams/issues/1207/1015851512@github.com>

Received on Tuesday, 18 January 2022 21:31:40 UTC