#How does the tokio::join! macro work?
3 messages · Page 1 of 1 (latest)
3 messages · Page 1 of 1 (latest)
i thought rust doesn't have variadic generics. so how does the join macro even work?
let a: (i32, f64, i32) = tokio::join!(async { 1 }, async { 2.0 }, async { 3 } );
it works with any number of arguments
let a: (T0, T1, T2, .....Tn) = tokio::join!( async { T1::new() }, ...., async { Tn::new() } );