Function embassy_futures::join::join3
source · pub fn join3<Fut1, Fut2, Fut3>(
future1: Fut1,
future2: Fut2,
future3: Fut3
) -> Join3<Fut1, Fut2, Fut3> ⓘ
Expand description
Joins the result of three futures, waiting for them all to complete.
This function will return a new future which awaits all futures to complete. The returned future will finish with a tuple of all results.
Note that this function consumes the passed futures and returns a wrapped version of it.
Examples
let a = async { 1 };
let b = async { 2 };
let c = async { 3 };
let res = embassy_futures::join::join3(a, b, c).await;
assert_eq!(res, (1, 2, 3));