-
Notifications
You must be signed in to change notification settings - Fork 212
Update tokio? #910
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
Update tokio? #910
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to make this wait in parallel before merging. Otherwise there's not much point in using async.
); | ||
} | ||
|
||
while let Some(result) = futures.next().await { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment, this waits on each in serial. Can we wait in parallel instead? That was the whole point of switching to async in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also doesn't wait in serial since the containing collection is a FuturesUnordered
. Calling .poll_next()
(and transitively .next()
) polls all contained futures until a ready one is found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FuturesUnordered
waits on all futures in itself concurrently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not quite following ... but @Nemo157 is I think one of the authors of futures
so I'll take his word for it 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, Nemo explained it in more depth here: https://discordapp.com/channels/442252698964721669/541978667522195476/736708951332225226
); | ||
} | ||
|
||
while let Some(result) = futures.next().await { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, Nemo explained it in more depth here: https://discordapp.com/channels/442252698964721669/541978667522195476/736708951332225226
With one runtime being used for S3 uploads via #909, it may work now?
Hopefully more successful than #799 and #758