mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-11 07:34:22 +00:00
Auto merge of #12466 - lnicola:worker-thread-stack, r=lnicola
Increase worker thread stack and name them CC #11370
This commit is contained in:
commit
6d3396a492
1 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue