Skip to content

Commit

Permalink
fix(runtime): remove forcing tokio core count to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Feb 27, 2025
1 parent 8b2c381 commit 4c6077a
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/common/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ fn build_tokio_runtime_builder() -> tokio::runtime::Builder {

if let Ok(worker_threads) = env::var("TOKIO_WORKER_THREADS") {
rt_builder.worker_threads(worker_threads.parse().unwrap());
} else {
// Default to 2 threads since this is likely running in a shared
// context. If we constrain this task to use 100 MHz an 8 core system,
// it will still spawn 8 threads needlessly.
//
// If a service is configured to use a dedicated core, Bolt will expose
// the correct thread count.
rt_builder.worker_threads(2);
}

if let Ok(max_blocking_threads) = env::var("TOKIO_MAX_BLOCKING_THREADS") {
Expand Down

0 comments on commit 4c6077a

Please sign in to comment.