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

link parallel async iterator slides #1316

Merged
merged 1 commit into from
Jan 25, 2023
Merged

link parallel async iterator slides #1316

merged 1 commit into from
Jan 25, 2023

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Jan 25, 2023

(Yes, I know this is very late, but since it concerns a stage 3 proposal I can't really defer it.)

@michaelficarra michaelficarra merged commit b43f538 into main Jan 25, 2023
@michaelficarra michaelficarra deleted the bakkot-patch-1 branch January 25, 2023 20:47
@erights
Copy link
Contributor

erights commented Jan 25, 2023

@bakkot , Wow, this is a great idea! However, process-wise I think it does indeed need to be bumped back to stage 2 to do this. It is not a trivial change.

@bakkot
Copy link
Contributor Author

bakkot commented Jan 25, 2023

@erights Yeah, agreed, and I'm sorry I didn't think this all the way through earlier. I'm hoping we can keep sync helpers at stage 3, since none of this is relevant to them.

@erights
Copy link
Contributor

erights commented Jan 26, 2023

I am in favor of keeping sync helpers at stage 3.

@zloirock
Copy link

zloirock commented Jan 26, 2023

(I hope that it will be added as new methods like .mapParallel since for many cases required sequential semantics.)

@bakkot
Copy link
Contributor Author

bakkot commented Jan 26, 2023

@zloirock You will get sequential semantics unless you manually call .next() multiple times without waiting for the previous promise to settle first. In other words, if you want sequential semantics, just consume the promises sequentially. The change I'm proposing is only observably different if you go out of your way to call .next() eagerly.

@zloirock
Copy link

Ah, clear. Makes sense. In this case, I don't think that makes sense to bump it back to stage 2.

@bakkot
Copy link
Contributor Author

bakkot commented Jan 26, 2023

Unfortunately, while it's a very minor change for users of the proposal, it's a fairly major change in terms of the specification and implementation, so I think a return to stage 2 is probably warranted. But we'll see what the committee thinks.

@bakkot
Copy link
Contributor Author

bakkot commented Jan 26, 2023

Made an issue so discussion of this change can have a home: tc39/proposal-iterator-helpers#262

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

Successfully merging this pull request may close these issues.

4 participants