-
Notifications
You must be signed in to change notification settings - Fork 653
Provide alternative precedences for select! #1805
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
Comments
There is This differs from the current implementation, which I believe chooses to use randomness implicitly following Golang's lead. (I think I'm in favor of random being opt-in, personally.) |
I would like to like to see it too! One benefit of that would be also that the Regarding what the default should be, I am undecided:
In the current state maybe adding a |
Would it make sense to have a macro for equal priority round robin polling? Like |
It would also allow constituents of different types and do not require |
The
select!
macro currently selects a random future in case multiple futures are ready.It would be useful to be able to specify the precedence, for example choosing the first future like the existing behavior of
Select
.This could be implemented by providing a parameter or with a separate wrapper macro such as
select_first!
.Of course it's possible to work around this by not using the
select!
macro or by calling it multiple times, but it seems useful to have.The text was updated successfully, but these errors were encountered: