3 ms·
Your case sounds like where you'd use select()/select! to wait on multiple things? A lot of writing about async/await neglects to mention multiple potential eve
by mkj 3y ago
Your case sounds like where you'd use select()/select! to wait on multiple things? A lot of writing about async/await neglects to mention multiple potential events, but async/await's reason is really that case.
select! {
() = wait_for_tick() => println!("tock"),
v = woken_thing() => println!("woke with {v}"),
}