Skip to content

Commit ccd14a5

Browse files
committed
Increase job_sender queue
1 parent 987fcf7 commit ccd14a5

File tree

1 file changed

+1
-2
lines changed
  • crates/ty_server/src/server/schedule/thread

1 file changed

+1
-2
lines changed

crates/ty_server/src/server/schedule/thread/pool.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ impl Pool {
5151

5252
let threads = usize::from(threads);
5353

54-
// Channel buffer capacity is between 2 and 4, depending on the pool size.
55-
let (job_sender, job_receiver) = crossbeam::channel::bounded(std::cmp::min(threads * 2, 4));
54+
let (job_sender, job_receiver) = crossbeam::channel::bounded(std::cmp::max(threads * 2, 4));
5655
let extant_tasks = Arc::new(AtomicUsize::new(0));
5756

5857
let mut handles = Vec::with_capacity(threads);

0 commit comments

Comments
 (0)