Skip to content

Commit

Permalink
Increase worker thread stack and name them
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Jun 4, 2022
1 parent 044b6dd commit 0b9cd8a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/rust-analyzer/src/task_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b9cd8a

Please sign in to comment.