Remove redundant threadpools in sigverify (#7888)

* Limit the number of thread pools sigverify creates

* Name local threadpools
This commit is contained in:
Sagar Dhawan
2020-01-20 20:08:19 -08:00
committed by GitHub
parent 1fe11e9ae2
commit 2dd8ab197d
9 changed files with 84 additions and 82 deletions

View File

@@ -46,6 +46,7 @@ pub const OFFSET_OF_SHRED_INDEX: usize = OFFSET_OF_SHRED_SLOT + SIZE_OF_SHRED_SL
thread_local!(static PAR_THREAD_POOL: RefCell<ThreadPool> = RefCell::new(rayon::ThreadPoolBuilder::new()
.num_threads(get_thread_count())
.thread_name(|ix| format!("shredder_{}", ix))
.build()
.unwrap()));