- From: Takeshi Yoshino <notifications@github.com>
- Date: Wed, 15 Apr 2015 00:06:59 -0700
- To: whatwg/streams <streams@noreply.github.com>
Received on Wednesday, 15 April 2015 07:07:25 UTC
When one wants to create a chain to exchange operations, they choose to use the ack functionality carefully. If they don't, they can use one without the functionality. So, in case the consumer choose to use `.read()` without ack, maybe we just ack on `.read()` fulfillment. Regarding the buffer reusable `.write()` (https://github.com/yutakahirano/fetch-with-streams/issues/30#issuecomment-92942922 https://github.com/yutakahirano/fetch-with-streams/issues/30#issuecomment-92955087), I think in case the user chooses readable-without-ack while the writable is buffer-reusable, we just cannot avoid copying contents. I.e., when fulfilling `.read()` (without ack functionality), we create a new view, return the view to the consumer and return the original view back to the producer. If the consumer really care efficiency, the consumer can choose to use `.read()` with ack functionality to return used buffer to the readable. --- Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/329#issuecomment-93227877
Received on Wednesday, 15 April 2015 07:07:25 UTC