Skip to content

Commit

Permalink
Auto merge of rust-lang#12466 - lnicola:worker-thread-stack, r=lnicola
Browse files Browse the repository at this point in the history
Increase worker thread stack and name them

CC rust-lang#11370
  • Loading branch information
bors committed Jun 5, 2022
2 parents 815b434 + 0b9cd8a commit 6d3396a
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 6d3396a

Please sign in to comment.