fix: missing thread name when spawning (#31656)

* Add missing thread name when spawning

* Update namings
This commit is contained in:
Ngo Iok Ui (Wu Yu Wei) 2024-03-14 19:40:58 +09:00 committed by GitHub
parent 78fe461ff2
commit b1debf2068
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 36 additions and 28 deletions

View file

@ -526,6 +526,7 @@ pub struct CoreResourceThreadPool {
impl CoreResourceThreadPool {
pub fn new(num_threads: usize) -> CoreResourceThreadPool {
let pool = rayon::ThreadPoolBuilder::new()
.thread_name(|i| format!("CoreResourceThread#{i}"))
.num_threads(num_threads)
.build()
.unwrap();