@@ -32,7 +32,7 @@ macro_rules! doc {
3232 ///
3333 /// [`tokio::spawn`]: crate::spawn
3434 ///
35- /// # Fairness
35+ /// # Poll Ordering
3636 ///
3737 /// By default, `join!`'s generated future rotates which contained
3838 /// future is polled first whenever it is woken.
@@ -44,12 +44,11 @@ macro_rules! doc {
4444 /// You may want this if your futures may interact in a way where known polling order is significant.
4545 ///
4646 /// But there is an important caveat to this mode. It becomes your responsibility
47- /// to ensure that the polling order of your futures is fair . If for example you
48- /// are joining a stream and a shutdown future, and the stream has a
49- /// huge volume of messages that takes a long time to finish processing per poll , you should
47+ /// to ensure that the polling order of your futures is reasonable . If for example you
48+ /// are joining a long-running server future with a shutdown future, and you want to make
49+ /// sure that no new requests are dispatched following a shutdown , you should
5050 /// place the shutdown future earlier in the `join!` list to ensure that it is
51- /// always polled, and will not be delayed due to the stream future taking a long time to return
52- /// `Poll::Pending`.
51+ /// always polled first.
5352 ///
5453 /// # Examples
5554 ///
@@ -225,8 +224,8 @@ doc! {macro_rules! join {
225224 ( ) => { async { } . await }
226225} }
227226
228- #[ derive( Default , Debug ) ]
229227/// Rotates by one every [`Self::num_skip`] call up to COUNT - 1.
228+ #[ derive( Default , Debug ) ]
230229pub struct Rotator < const COUNT : u32 > {
231230 next : u32 ,
232231}
0 commit comments