Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Encoding's "streams" to "I/O queues" #215

Merged
merged 27 commits into from Sep 8, 2020
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
cbeb639
Rename Encoding's "streams" to "token queues"
May 28, 2020
bb9b17b
Export token queue and its algorithms.
May 28, 2020
a53fcbd
Don't export prepend.
Jun 4, 2020
660bd8e
Adds implicit conversions between token queues and strings/byte seque…
Jun 4, 2020
f93f483
Merge remote-tracking branch 'upstream/master' into token-queues
Jun 21, 2020
5367e9b
Fixing typos in the conversion algorithms before refactoring
Jul 15, 2020
1114d02
Renaming token queues to I/O queues and making them a subtype of list
Jul 15, 2020
0314d3e
Add the blocking behavior and the special handling of EOF
Jul 16, 2020
04c5e8f
Clarify that streaming I/O queues should be used in parallel
Jul 16, 2020
c62d26c
Remove link defaults for list and ReadableStream.
Jul 16, 2020
68f4d9d
Rename EOF to end-of-queue.
Jul 16, 2020
2bff546
Use create, convert and so on on the API section.
Jul 16, 2020
2d5354d
Fix trailing whitespace.
Jul 16, 2020
f55ce2c
Remove link defaults for item
Jul 16, 2020
5fba611
Add a peek operation.
Jul 16, 2020
189f580
Reduce the conversions to a short paragraph.
Jul 20, 2020
9dab74d
Incorporate a suggestion from code review
Jul 22, 2020
d23557c
Using the list shorthand rather than a "create" operation.
Jul 22, 2020
eca3dbe
Incorporate suggestions from code review.
Aug 26, 2020
a65d680
Don't change the id of the insertion example
Aug 26, 2020
f4dff40
formatting nits
annevk Aug 31, 2020
a4916e6
Change push and prepend to avoid end-of-queue items on the wrong places.
Sep 2, 2020
88ac022
Refactor BOM sniff in terms of the peek operation.
Sep 2, 2020
852adcb
Update the language for reading multiple bytes in UTF-8 decode
Sep 3, 2020
4096269
Add an output optional parameter to the decode/encode hooks.
Sep 3, 2020
faae433
Push end-of-queue on the process operation
Sep 7, 2020
fa4a2cf
minor nits
annevk Sep 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions encoding.bs
Expand Up @@ -152,6 +152,28 @@ run these steps:
<li><p>Return <var>readItems</var>.
</ol>

<p>To <dfn for="I/O queue" export>peek</dfn> a number <var>number</var> of <a for=list>items</a>
andreubotella marked this conversation as resolved.
Show resolved Hide resolved
from an <a for=/>I/O queue</a> <var>ioQueue</var>, run these steps:

<ol>
<li><p>Wait until either <var>ioQueue</var>'s <a for=list>size</a> is equal to or greater than
<var>number</var>, or <var>ioQueue</var> <a for=list>contains</a> <a>end-of-queue</a>, whichever
comes first.

<li><p>Let <var>prefix</var> be an empty list.

<li>
<p><a for=list>For each</a> <var>n</var> in <a>the range</a> 1 to <var>number</var>, inclusive:

<ol>
<li><p>If <var>ioQueue</var>[<var>n</var>] is <a>end-of-queue</a>, <a>break</a>. Otherwise,
andreubotella marked this conversation as resolved.
Show resolved Hide resolved
<a for=list>append</a> <var>ioQueue</var>[<var>n</var>] to <var>prefix</var>.
</ol>
</li>

<li><p>Return <var>prefix</var>.
</ol>

<p>To <dfn id=concept-stream-push for="I/O queue" export>push</dfn> one
andreubotella marked this conversation as resolved.
Show resolved Hide resolved
<a for=list>item</a> <var>item</var> to an <a for=/>I/O queue</a> <var>ioQueue</var>, run
these steps:
Expand Down