Re: [whatwg/streams] [WritableStream] Shouldn't the state after writer.abort() be closed? (#464)

> Can you explain why it is impossible now? I don't see why things would have changed. Error propagation through the pipe chain is super important; we can't lose that. The lack of it in Node streams has been very painful.

Oh, sorry for lack of context. I was talking about aborting pipeTo() by abort()-ing the destination. It's impossible as we're adding the locking mechanism to the writable stream suite, and so the destination writable stream is locked by pipeTo(). No one other than the ongoing pipeTo() may abort the writable stream.

At some point, IIRC, we discussed some redesign of pipeTo() interface. After introducing locking mechanism to both, we need to extend pipeTo() to give us some controller (I'm not catching up with progress on cancellable promise. It could be to some extent covered by it).

The controller may have a method for abort()-ing the pipeTo(). It would take an object to pass to source.cancel() and dest.abort(). We could design it to take the errors for them separately or only one for both.
- pipeController.abort(sourceReason, destReason);
- pipeController.abort(reason);


---
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/464#issuecomment-223196124

Received on Thursday, 2 June 2016 05:03:39 UTC