[−][src]Macro futures_util::join
Polls multiple futures simultaneously, returning a tuple of all results once complete.
While join!(a, b)
is similar to (await!(a), await!(b))
,
join!
polls both futures concurrently and therefore is more efficent.
This macro is only usable inside of async functions, closures, and blocks.
Examples
#![feature(async_await, await_macro)] use futures::{join, future}; let a = future::ready(1); let b = future::ready(2); assert_eq!(join!(a, b), (1, 2));