File tree 3 files changed +6
-11
lines changed
3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ macro_rules! doc {
45
45
///
46
46
/// But there is an important caveat to this mode. It becomes your responsibility
47
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
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
50
50
/// place the shutdown future earlier in the `join!` list to ensure that it is
51
51
/// always polled, and will not be delayed due to the stream future taking a long time to return
52
52
/// `Poll::Pending`.
@@ -225,8 +225,8 @@ doc! {macro_rules! join {
225
225
( ) => { async { } . await }
226
226
} }
227
227
228
- #[ derive( Default , Debug ) ]
229
228
/// Rotates by one every [`Self::num_skip`] call up to COUNT - 1.
229
+ #[ derive( Default , Debug ) ]
230
230
pub struct Rotator < const COUNT : u32 > {
231
231
next : u32 ,
232
232
}
Original file line number Diff line number Diff line change @@ -3,10 +3,7 @@ cfg_macros! {
3
3
4
4
pub use std:: future:: poll_fn;
5
5
6
- // Used with `join!` and `try_join!`
7
- pub use crate :: macros:: join:: Rotator ;
8
- // Used with `join!` and `try_join!`
9
- pub use crate :: macros:: join:: BiasedRotator ;
6
+ pub use crate :: macros:: join:: { BiasedRotator , Rotator } ;
10
7
11
8
#[ doc( hidden) ]
12
9
pub fn thread_rng_n( n: u32 ) -> u32 {
@@ -28,8 +25,6 @@ cfg_macros! {
28
25
Poll :: Ready ( ( ) )
29
26
}
30
27
}
31
-
32
-
33
28
}
34
29
35
30
pub use std:: future:: { Future , IntoFuture } ;
Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ macro_rules! doc {
43
43
///
44
44
/// But there is an important caveat to this mode. It becomes your responsibility
45
45
/// to ensure that the polling order of your futures is fair. If for example you
46
- /// are joining a stream and a shutdown future, and the stream has a
47
- /// huge volume of messages that takes a long time to finish processing per poll , you should
46
+ /// are try_joining a long-running server future with a shutdown future, and you want to make
47
+ /// sure that no new requests are dispatched following a shutdown , you should
48
48
/// place the shutdown future earlier in the `try_join!` list to ensure that it is
49
49
/// always polled, and will not be delayed due to the stream future taking a long time to return
50
50
/// `Poll::Pending`.
You can’t perform that action at this time.
0 commit comments