1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-02 13:29:24 +00:00

Expose SererBuilder::worker_max_blocking_threads (#2200)

This commit is contained in:
fakeshadow 2021-05-07 01:35:04 +08:00 committed by GitHub
parent ddaf8c3e43
commit 7d1d5c8acd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -1,9 +1,14 @@
# Changes
## Unreleased - 2021-xx-xx
### Added
* `HttpServer::worker_max_blocking_threads` for setting block thread pool. [#2200]
### Changed
* Update `language-tags` to `0.3`.
[#2200]: https://github.com/actix/actix-web/pull/2200
## 4.0.0-beta.6 - 2021-04-17
### Added

View file

@ -174,6 +174,16 @@ where
self
}
/// Set max number of threads for each worker's blocking task thread pool.
///
/// One thread pool is set up **per worker**; not shared across workers.
///
/// By default set to 512 / workers.
pub fn worker_max_blocking_threads(mut self, num: usize) -> Self {
self.builder = self.builder.worker_max_blocking_threads(num);
self
}
/// Set server keep-alive setting.
///
/// By default keep alive is set to a 5 seconds.