That would just be select!
Maybe future::race should return a struct `Race` that will resolve the first future, but also provides a way to extract the unresolved future. This would mean not using an async fn which I think we probably shouldn't be doing overall. https://docs.rs/async-std/1.5.0/async_std/future/trait.Future.html#method.race …
-
-
-
Exactly; but without the difficulties that macros bring. Would mostly be a small extension to the existing code to allow retrieving the other Future after polling is done: https://github.com/async-rs/async-std/blob/master/src/future/future/race.rs … Though it may very well not be worth it.
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.