Feature gate: #![feature(future_join)]
This is a tracking issue for core::future::join!, which polls multiple futures concurrently and returns their outputs.
async fn run() {
let (a, b) = join!(async { 0 }, async { 1 }).await;
}
Public API
// core::future
pub macro join {
( $($fut:expr),* $(,)?) => {
// ...
}
}
Steps / History
Unresolved Questions
- Implicit .await? Tokio and futures currently do this.
await_all! vs join!
join/and method on Future: a.and(b).await
- Implement
IntoFuture for N-arity tuples? let (a, b, c) = (a, b, c).await
Feature gate:
#![feature(future_join)]This is a tracking issue for
core::future::join!, which polls multiple futures concurrently and returns their outputs.Public API
Steps / History
core::future::join!#91645future::join!'s implementation #91721Unresolved Questions
await_all!vsjoin!join/andmethod onFuture:a.and(b).awaitIntoFuturefor N-arity tuples?let (a, b, c) = (a, b, c).await