diff --git a/cli/tokio_util.rs b/cli/tokio_util.rs index e477cd5eee..b25a2994f4 100644 --- a/cli/tokio_util.rs +++ b/cli/tokio_util.rs @@ -5,6 +5,12 @@ pub fn create_basic_runtime() -> tokio::runtime::Runtime { .basic_scheduler() .enable_io() .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() .unwrap() }