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

futures_unordered::IterMut does not implement Send #1801

Closed
canndrew opened this issue Aug 14, 2019 · 1 comment · Fixed by #2416
Closed

futures_unordered::IterMut does not implement Send #1801

canndrew opened this issue Aug 14, 2019 · 1 comment · Fixed by #2416
Labels
A-stream Area: futures::stream C-feature-request

Comments

@canndrew
Copy link
Contributor

I'm trying to write code that looks like this:

async fn foo() {
    for future in futures_unordered.iter_mut() {
        do_something_async().await;
    }
}

This, unfortunately, makes the future returned by foo non-Send because the IterMut exists across an await boundary. Is it possible to fix this and have IterMut implement Send?

@cramertj
Copy link
Member

Yes, there's no interesting reason why it isn't Send. I suspect it's just "an impl needs to be added" since it contains raw pointers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-stream Area: futures::stream C-feature-request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants