-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Enhance Documentation: Alternatives to select!
Macro
#7110
base: master
Are you sure you want to change the base?
Conversation
c8f2fb0
to
d31687f
Compare
Are there some issues with pr? |
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.
Sorry, I forgot to click submit on my review.
My most general comment is that I'm not sure the selection of alternatives is complete. Surely we cannot discuss alternatives to the tokio::select!
macro without mentioning the futures crate? It also has a macro called select!
that is different from our macro in various ways.
More generally, Tokio usually links to futures over futures-lite because the futures crate is an official rust-lang project. As for futures-concurrency, I am okay with linking to that since the direct purpose of that crate is to investigate alternatives to select, so it is obvious to mention it.
doc: prefer `futures` and `tokio_stream` in `selec!` alternatives examples
…f `select!` alternatives for race semantics
…tion safety problems
Thank you for the review, I've changed examples, moved the whole section after |
Oh, there is an infinite loop in example 😅 |
This PR adds documentation for ecosystem alternatives to the
select!
macro, such astokio_stream::StreamExt::merge
andfutures-concurrency
utilities. Providing these alternatives helps users make informed decisions by showcasing additional tools and patterns, as a lot of new users are not aware of any alternatives toselect!
.