tokio-rs / tokio

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
https://tokio.rs
MIT License
26.59k stars 2.45k forks source link

Improve documentation for select!{} #6572

Closed Xiretza closed 1 month ago

Xiretza commented 4 months ago

Motivation

The lifecycle explanation for select!{} was a little bumpy, since the step where all <async expression>s are disabled was never actually encountered (step 4 always went back to step 3).

Solution

Reorder the steps in the explanation, and also reword them slightly to clarify control flow.