Skip to content

Commit 7c197c7

Browse files
authored
runtime: clarify the edge case of Builder::global_queue_interval() (#7605)
1 parent 5f3f5b0 commit 7c197c7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tokio/src/runtime/builder.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,8 +980,10 @@ impl Builder {
980980
/// tasks. Setting the interval to a smaller value increases the fairness of the scheduler,
981981
/// at the cost of more synchronization overhead. That can be beneficial for prioritizing
982982
/// getting started on new work, especially if tasks frequently yield rather than complete
983-
/// or await on further I/O. Conversely, a higher value prioritizes existing work, and
984-
/// is a good choice when most tasks quickly complete polling.
983+
/// or await on further I/O. Setting the interval to `1` will prioritize the global queue and
984+
/// tasks from the local queue will be executed only if the global queue is empty.
985+
/// Conversely, a higher value prioritizes existing work, and is a good choice when most
986+
/// tasks quickly complete polling.
985987
///
986988
/// [the module documentation]: crate::runtime#multi-threaded-runtime-behavior-at-the-time-of-writing
987989
///

0 commit comments

Comments
 (0)