5 ms·
Simplify: tokio::select! will discard other futures when one future progress. The discarded futures will never be run again. Normally when a future is discard
by qouteall 11mo ago
Simplify: tokio::select! will discard other futures when one future progress.
The discarded futures will never be run again.
Normally when a future is discarded it's dropped. When a future holding lock is dropped, lock is released, but it's passing future borrow to select so the discarded future is not dropped while holding lock.
So it leaves a future that holds a lock that will never run again.