[−][src]Function smol::future::join
pub fn join<Fut1, Fut2>(future1: Fut1, future2: Fut2) -> Join<Fut1, Fut2>ⓘ where
Fut1: Future,
Fut2: Future,
Joins two futures, waiting for both to complete.
Examples
use futures_lite::*; let a = async { 1 }; let b = async { 2 }; assert_eq!(future::join(a, b).await, (1, 2));