mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
set maximum size of thread pool to 31 (#7290)
This commit is contained in:
parent
32de714dc7
commit
4b5d8bdbaf
1 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,12 @@ pub fn create_basic_runtime() -> tokio::runtime::Runtime {
|
||||||
.basic_scheduler()
|
.basic_scheduler()
|
||||||
.enable_io()
|
.enable_io()
|
||||||
.enable_time()
|
.enable_time()
|
||||||
|
// This limits the number of threads for blocking operations (like for
|
||||||
|
// synchronous fs ops) or CPU bound tasks like when we run dprint in
|
||||||
|
// parallel for deno fmt.
|
||||||
|
// The default value is 512, which is an unhelpfully large thread pool. We
|
||||||
|
// don't ever want to have more than a couple dozen threads.
|
||||||
|
.max_threads(32)
|
||||||
.build()
|
.build()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue