We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 987fcf7 commit ccd14a5Copy full SHA for ccd14a5
crates/ty_server/src/server/schedule/thread/pool.rs
@@ -51,8 +51,7 @@ impl Pool {
51
52
let threads = usize::from(threads);
53
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));
+ let (job_sender, job_receiver) = crossbeam::channel::bounded(std::cmp::max(threads * 2, 4));
56
let extant_tasks = Arc::new(AtomicUsize::new(0));
57
58
let mut handles = Vec::with_capacity(threads);
0 commit comments