Skip to content

Commit 5be31ca

Browse files
grantlemonselijah-potter
authored andcommitted
fix(#198): limit tokio threads to 4 (+ main)
1 parent 40ade1e commit 5be31ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

harper-ls/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ struct Args {
3131
stdio: bool,
3232
}
3333

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

0 commit comments

Comments
 (0)