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
@ -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 New Issue
Block a user