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

Generators.asyncInput? #126

Open
mbostock opened this issue Oct 10, 2019 · 1 comment
Open

Generators.asyncInput? #126

mbostock opened this issue Oct 10, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@mbostock
Copy link
Member

It’d be nice to have an async iterator version of Generators.input.

Same also with Generators.queue and Generators.observe?

@tomlarkworthy
Copy link

Yes, I ran into this during https://talk.observablehq.com/t/metaprogramming-with-peek-peekfirst/4540

The runtime emits a stream of values and which error is not know in advance. This is best modelled as an async generator of concrete values, rather than a generator of promises. An async generator prevents the caller from calling next() until the value is known.

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

No branches or pull requests

2 participants