-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Improve LocalPoolHandle #4680
Improve LocalPoolHandle #4680
Conversation
2c23c9c
to
aca3e04
Compare
@Darksonn Addressed your review. |
58ed9ac
to
2d8f30c
Compare
71c63c0
to
31178f2
Compare
✅ Deploy Preview for tokio-rs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@Darksonn Updated the PR. |
1368c20
to
fe3f28d
Compare
Your doc-tests don't compile. |
fe3f28d
to
8a2f723
Compare
… a loop to spawn a task on all threads
8a2f723
to
5e72463
Compare
tokio-util/src/task/spawn_pinned.rs
Outdated
/// let _ = handles | ||
/// .into_iter() | ||
/// .map(|handle| async { handle.await.unwrap() }); |
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 doesn't actually await them because iterators are lazy. Just use a for loop over handles
instead.
/// let _ = handles | |
/// .into_iter() | |
/// .map(|handle| async { handle.await.unwrap() }); | |
/// for handle in handles { | |
/// handle.await.unwrap(); | |
/// } |
I believe everything this is missing is a bit of documentation stuff. Are you able to finish the PR? |
I forgot that you replied to this, sorry about that. Is there anything else that needs to be changed? |
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.
Looks good to me.
Adds some functionality to
LocalPoolHandle
and tries to improve existing docs.Fixes #4661