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

Suggestion: Spawn tasks on first poll #6

Open
Thegaram opened this issue Mar 20, 2020 · 0 comments
Open

Suggestion: Spawn tasks on first poll #6

Thegaram opened this issue Mar 20, 2020 · 0 comments

Comments

@Thegaram
Copy link

"A fundamental difference between Rust's futures and those from other languages is that Rust's futures do not do anything unless polled. " [0] I think following this behavior in this crate would make it more consistent with the rest of the ecosystem.

Current behavior: The snippet below keeps printing "called" indefinitely even though we did not await it.

crate::from_stream(async_std::stream::repeat(5usize))
        .for_each(|_| async { println!("called") });
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

No branches or pull requests

1 participant