diff --git a/tokio/src/runtime/builder.rs b/tokio/src/runtime/builder.rs index f4bf3a259..5b7130e74 100644 --- a/tokio/src/runtime/builder.rs +++ b/tokio/src/runtime/builder.rs @@ -445,6 +445,15 @@ impl Builder { /// /// The default value is 512. /// + /// # Queue Behavior + /// + /// When a blocking task is submitted, it will be inserted into a queue. If available, one of + /// the idle threads will be notified to run the task. Otherwise, if the threshold set by this + /// method has not been reached, a new thread will be spawned. If no idle thread is available + /// and no more threads are allowed to be spawned, the task will remain in the queue until one + /// of the busy threads pick it up. Note that since the queue does not apply any backpressure, + /// it could potentially grow unbounded. + /// /// # Panics /// /// This will panic if `val` is not larger than `0`.