Function cros_async::complete2
source · pub async fn complete2<F1, F2>(f1: F1, f2: F2) -> (F1::Output, F2::Output)
Expand description
Creates a combinator that runs the two given futures to completion, returning a tuple of the outputs each yields.
§Example
use cros_async::{complete2, block_on};
let first = async {5};
let second = async {6};
assert_eq!(block_on(complete2(first, second)), (5,6));