macro_rules! all_of {
($($fut:expr),+ $(,)?) => { ... };
}Expand description
Wait for all of several futures to resolve.
Each expression is automatically pinned in a Box. All futures must have
Output = ().
§Example
use simu::{SimEnv, all_of};
let mut env = SimEnv::with_seed(0);
let h = env.handle();
env.spawn(async move {
// resolves at t=5, when the slowest sub-future completes
all_of![h.timeout(1.0), h.timeout(3.0), h.timeout(5.0)].await;
});
env.run();