chore: Use `i` over `ix` variable name when naming worker threads (#30206)

This commit is contained in:
steviez 2023-02-08 19:24:57 -06:00 committed by GitHub
parent 1ad69cfc38
commit d3dab24bbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 9 deletions

View File

@ -100,7 +100,7 @@ const MAX_REPAIR_RETRY_LOOP_ATTEMPTS: usize = 10;
lazy_static! {
static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new()
.num_threads(MAX_CONCURRENT_FORKS_TO_REPLAY)
.thread_name(|ix| format!("solReplay{ix:02}"))
.thread_name(|i| format!("solReplay{i:02}"))
.build()
.unwrap();
}

View File

@ -443,7 +443,7 @@ impl Validator {
}
if rayon::ThreadPoolBuilder::new()
.thread_name(|ix| format!("solRayonGlob{ix:02}"))
.thread_name(|i| format!("solRayonGlob{i:02}"))
.build_global()
.is_err()
{

View File

@ -47,7 +47,7 @@ use {
lazy_static! {
static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new()
.num_threads(get_max_thread_count())
.thread_name(|ix| format!("solEntry{ix:02}"))
.thread_name(|i| format!("solEntry{i:02}"))
.build()
.unwrap();
}

View File

@ -92,12 +92,12 @@ pub use {
lazy_static! {
static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new()
.num_threads(get_max_thread_count())
.thread_name(|ix| format!("solBstore{ix:02}"))
.thread_name(|i| format!("solBstore{i:02}"))
.build()
.unwrap();
static ref PAR_THREAD_POOL_ALL_CPUS: ThreadPool = rayon::ThreadPoolBuilder::new()
.num_threads(num_cpus::get())
.thread_name(|ix| format!("solBstoreAll{ix:02}"))
.thread_name(|i| format!("solBstoreAll{i:02}"))
.build()
.unwrap();
}

View File

@ -79,7 +79,7 @@ struct ReplayEntry {
lazy_static! {
static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new()
.num_threads(get_max_thread_count())
.thread_name(|ix| format!("solBstoreProc{ix:02}"))
.thread_name(|i| format!("solBstoreProc{i:02}"))
.build()
.unwrap();
}

View File

@ -24,7 +24,7 @@ use {
lazy_static! {
static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new()
.num_threads(get_thread_count())
.thread_name(|ix| format!("solShredder{ix:02}"))
.thread_name(|i| format!("solShredder{i:02}"))
.build()
.unwrap();
}

View File

@ -26,7 +26,7 @@ const SIGN_SHRED_GPU_MIN: usize = 256;
lazy_static! {
static ref SIGVERIFY_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new()
.num_threads(get_thread_count())
.thread_name(|ix| format!("solSvrfyShred{ix:02}"))
.thread_name(|i| format!("solSvrfyShred{i:02}"))
.build()
.unwrap();
}

View File

@ -36,7 +36,7 @@ pub const VERIFY_MIN_PACKETS_PER_THREAD: usize = 128;
lazy_static! {
static ref PAR_THREAD_POOL: ThreadPool = rayon::ThreadPoolBuilder::new()
.num_threads(get_thread_count())
.thread_name(|ix| format!("solSigVerify{ix:02}"))
.thread_name(|i| format!("solSigVerify{i:02}"))
.build()
.unwrap();
}