Skip to content

Commit 0b9cd8a

Browse files
committed
Increase worker thread stack and name them
1 parent 044b6dd commit 0b9cd8a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/rust-analyzer/src/task_pool.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ pub(crate) struct TaskPool<T> {
99

1010
impl<T> TaskPool<T> {
1111
pub(crate) fn new(sender: Sender<T>) -> TaskPool<T> {
12-
TaskPool { sender, inner: threadpool::ThreadPool::default() }
12+
const STACK_SIZE: usize = 8 * 1024 * 1024;
13+
14+
let inner = threadpool::Builder::new()
15+
.thread_name("Worker".into())
16+
.thread_stack_size(STACK_SIZE)
17+
.build();
18+
TaskPool { sender, inner }
1319
}
1420

1521
pub(crate) fn spawn<F>(&mut self, task: F)

0 commit comments

Comments
 (0)