diff --git a/actix-server/src/builder.rs b/actix-server/src/builder.rs index 41a8d179..78a1323d 100644 --- a/actix-server/src/builder.rs +++ b/actix-server/src/builder.rs @@ -78,20 +78,19 @@ impl ServerBuilder { self } - /// Set number of max blocking threads for running blocking task on thread pool. + /// Set max number of threads for each worker's blocking task thread pool. /// - /// * This thread pool is per worker and `NOT` shared across workers. + /// One thread pool is set up **per worker**; not shared across workers. /// /// # Examples: - /// ```rust + /// ``` /// # use actix_server::ServerBuilder; /// let builder = ServerBuilder::new() /// .workers(4) // server has 4 worker thread. /// .worker_max_blocking_threads(4); // every worker has 4 max blocking threads. /// ``` /// - /// See [tokio::runtime::Builder::max_blocking_threads](tokio::runtime::Builder::max_blocking_threads) - /// for behavior reference. + /// See [tokio::runtime::Builder::max_blocking_threads] for behavior reference. pub fn worker_max_blocking_threads(mut self, num: usize) -> Self { self.worker_config.max_blocking_threads(num); self diff --git a/actix-server/src/worker.rs b/actix-server/src/worker.rs index 8aa90a08..9d6d9fa5 100644 --- a/actix-server/src/worker.rs +++ b/actix-server/src/worker.rs @@ -159,7 +159,7 @@ enum WorkerServiceStatus { Stopped, } -// config for worker behavior passed from server builder. +/// Config for worker behavior passed down from server builder. #[derive(Copy, Clone)] pub(crate) struct ServerWorkerConfig { shutdown_timeout: Duration,