One of the common pattern you can see withtokio, popular crate for async runtime, is tokio::select! pattern. It polls multiple futures concurrently and runs whichever completes first, cancelling the r
Markdown supported · ⌘↵ to post
No responses yet.