Re: [whatwg/encoding] Rename Encoding's "streams" to "I/O queues" (#215)

@annevk commented on this pull request.



> @@ -102,17 +102,72 @@ values</a>). <dfn id="end-of-stream" export>End-of-file</dfn> is a special
 <a>item</a> that can be present in <a for=/>I/O queues</a> of any type, and that
 signifies no more <a>items</a> are in the queue.
 
-<p>When an <a>item</a> is
-<dfn id=concept-stream-read for="I/O queue" export>read</dfn> from an
-<a for=/>I/O queue</a>, the first item in the queue must be returned and
-subsequently removed, and <a>end-of-file</a> must be returned otherwise.
-<!-- this means read is blocking on e.g. networking activity;
-     SimonSapin thinks this is fine, blame him if not -->
+<p>To <dfn>create an I/O queue</dfn>, return a new <a for=/>I/O queue</a>
+containing an <a>end-of-file</a> item.
+
+<div class=note>
+ <p>There are two ways to use an <a for=/>I/O queue</a>: in immediate
+ mode, where the queue's last item is <a>end-of-file</a>, and where the
+ <a for="I/O queue">read</a> operation cannot block; and in streaming mode, to
+ represent data coming in from the network, where the queue need not have an
+ <a>end-of-file</a> item and <a for="I/O queue">read</a> might block.

I would expect I/O queue to have a non-blocking I/O queue subtype or some such that always contains an end-of-file, but I don't think we should do that from the start.

-- 
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/encoding/pull/215#discussion_r457326089

Received on Monday, 20 July 2020 12:12:27 UTC