Increase worker thread stack and name them
This commit is contained in:
parent
044b6ddca9
commit
0b9cd8a468
@ -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