mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-31 11:02:08 +01:00
fix actix-files doc about thread pool (#1898)
This commit is contained in:
parent
57398c6df1
commit
46a8f28b74
@ -82,8 +82,9 @@ impl Files {
|
|||||||
/// be inaccessible. Register more specific handlers and services first.
|
/// be inaccessible. Register more specific handlers and services first.
|
||||||
///
|
///
|
||||||
/// `Files` uses a threadpool for blocking filesystem operations. By default, the pool uses a
|
/// `Files` uses a threadpool for blocking filesystem operations. By default, the pool uses a
|
||||||
/// number of threads equal to 5x the number of available logical CPUs. Pool size can be changed
|
/// max number of threads equal to `512 * HttpServer::worker`. Real time thread count are
|
||||||
/// by setting ACTIX_THREADPOOL environment variable.
|
/// adjusted with work load. More threads would spawn when need and threads goes idle for a
|
||||||
|
/// period of time would be de-spawned.
|
||||||
pub fn new<T: Into<PathBuf>>(mount_path: &str, serve_from: T) -> Files {
|
pub fn new<T: Into<PathBuf>>(mount_path: &str, serve_from: T) -> Files {
|
||||||
let orig_dir = serve_from.into();
|
let orig_dir = serve_from.into();
|
||||||
let dir = match orig_dir.canonicalize() {
|
let dir = match orig_dir.canonicalize() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user