Skip to content

Commit

Permalink
fix(#198): limit tokio threads to 4 (+ main)
Browse files Browse the repository at this point in the history
  • Loading branch information
grantlemons committed Oct 4, 2024
1 parent 40ade1e commit d6f6755
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion harper-ls/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ struct Args {
stdio: bool,
}

#[tokio::main]
// Setting worker threads to 4 means the process will use about 5 threads total
// This is because worker threads do not include blocking threads
#[tokio::main(worker_threads = 4)]
async fn main() -> anyhow::Result<()> {
let subscriber = FmtSubscriber::builder()
.map_writer(move |_| stderr)
Expand Down

0 comments on commit d6f6755

Please # to comment.