pub async fn select2<L: Future, R: Future>(
left: L,
right: R,
) -> Either2<L::Output, R::Output>Expand description
Polls two futures concurrently, resolves the one that completes first.
If both complete at the same time, the left one wins, the other one is dropped.
ยงCancel safety
This function is cancel safe if both left and right are.