diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2022-06-04 20:48:51 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2022-06-04 20:48:51 +0300 |
| commit | 0b9cd8a468d63ebda3d7955faf92296d1abcdac0 (patch) | |
| tree | 46a36f3ee3d88b9c139d3c41f3eff1bc24310d08 | |
| parent | 044b6ddca93375320db7f33744bf14a061b016e6 (diff) | |
| download | rust-0b9cd8a468d63ebda3d7955faf92296d1abcdac0.tar.gz rust-0b9cd8a468d63ebda3d7955faf92296d1abcdac0.zip | |
Increase worker thread stack and name them
| -rw-r--r-- | crates/rust-analyzer/src/task_pool.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/task_pool.rs b/crates/rust-analyzer/src/task_pool.rs index 83389373903..aeeb3b7c582 100644 --- a/crates/rust-analyzer/src/task_pool.rs +++ b/crates/rust-analyzer/src/task_pool.rs @@ -9,7 +9,13 @@ pub(crate) struct TaskPool<T> { impl<T> TaskPool<T> { pub(crate) fn new(sender: Sender<T>) -> TaskPool<T> { - TaskPool { sender, inner: threadpool::ThreadPool::default() } + const STACK_SIZE: usize = 8 * 1024 * 1024; + + let inner = threadpool::Builder::new() + .thread_name("Worker".into()) + .thread_stack_size(STACK_SIZE) + .build(); + TaskPool { sender, inner } } pub(crate) fn spawn<F>(&mut self, task: F) |
