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

Add async value iterators and async iterator arguments #808

Merged
merged 4 commits into from Apr 21, 2020

Conversation

domenic
Copy link
Member

@domenic domenic commented Sep 27, 2019

Closes #800.


Preview | Diff

index.bs Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
@domenic domenic changed the title WIP: Async value iterators Add async value iterators and async iterator arguments Mar 24, 2020
@domenic domenic marked this pull request as ready for review March 24, 2020 22:05
@domenic

This comment has been minimized.

@domenic
Copy link
Member Author

domenic commented Mar 26, 2020

Rebased on master, made LL(1), and ready for review!

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
@domenic
Copy link
Member Author

domenic commented Mar 31, 2020

Ping on reviews?

Comment on lines +4301 to 4303
async iterable<value_type>;
async iterable<value_type>(/* arguments... */);
async iterable<key_type, value_type>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably also be listed, given that it's valid:

async iterable<key_type, value_type>(/* arguments... */);

Copy link
Member

@EdgarChen EdgarChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you and sorry for the terrible lag.

index.bs Outdated
@@ -12655,8 +12725,16 @@ The \[[Prototype]] [=internal slot=] of an [=asynchronous iterator prototype obj
1. Set |object|'s [=default asynchronous iterator object/is finished=] to true.
1. Return [=!=] [$CreateIterResultObject$](<emu-val>undefined</emu-val>,
<emu-val>true</emu-val>).
1. Otherwise:
1. Otherwise, if the corresponding [=asynchronously iterable declaration=] is a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have interface defined in step 1,

  1. Let interface be the interface for which the asynchronous iterator prototype object exists.

could we use something like if interface has a pair asynchronously iterable declaration instead?

index.bs Outdated
1. Return the [=iterator result=] for |next| and |kind|.
1. Otherwise:
1. Assert: the corresponding [=asynchronously iterable declaration=] is a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

@domenic
Copy link
Member Author

domenic commented Apr 21, 2020

Thanks for the review! Code review comments addressed, plus removed an extra clause that I saw in my own re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Extending async iterators to support streams
6 participants