Repository navigation
Stream select macro - #2262
Merged
Merged
Stream select macro#2262
Conversation
Xaeroxe
force-pushed
the
stream-select
branch
from
November 13, 2020 23:47
c360f16 to
d3d9c53
Compare
taiki-e
self-requested a review
November 15, 2020 18:11
Xaeroxe
force-pushed
the
stream-select
branch
from
November 20, 2020 17:46
b3b3271 to
4ddcdf1
Compare
taiki-e
requested changes
Jun 16, 2021
taiki-e
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR and sorry for the late review!
I think it makes sense to add a feature like this (this is actually a stream version of simple select), but I don't want to add features that rely on Fused{Future,Stream} because Fused{Future,Stream} will be removed in the next major version.
Contributor
Author
|
@taiki-e I've removed the FusedStream dependency, this is now ready for review. |
taiki-e
self-requested a review
June 24, 2021 14:38
taiki-e
requested changes
Jul 29, 2021
taiki-e
left a comment
Member
There was a problem hiding this comment.
impl LGTM. Sorry for the late review!
Contributor
Author
|
@taiki-e ready for re-review, thank you! |
taiki-e
reviewed
Jul 30, 2021
taiki-e
approved these changes
Jul 30, 2021
taiki-e
pushed a commit
that referenced
this pull request
Aug 28, 2021
Merged
taiki-e
pushed a commit
that referenced
this pull request
Aug 30, 2021
Merged
Member
|
Published in 0.3.17 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new procedural macro to the futures crate that I've found some use for.
stream_select!works similarly to theselect_allfunction, but doesn't require the streams to all be the same type. Nor does it use aBox<dyn Stream>to accomplish that.It's implemented in terms of the, but represents a type rather than multiple branches of execution. In my use case I would feed the stream fromselect!macrostream_select!into aselect!statement, as many of the streams I want toselect!over should be treated identically in theselect!statement.Reviewers may ask "Why not just use the
selectfunction repeatedly?" And the answer to that is that recursive use of theselectfunction results in an unfair stream, with priority being given to streams on the upper layers.