From d3dab24bbe6b7e3f224da9873383d4320f6c2f5b Mon Sep 17 00:00:00 2001 From: steviez Date: Wed, 8 Feb 2023 19:24:57 -0600 Subject: [PATCH] chore: Use `i` over `ix` variable name when naming worker threads (#30206) --- core/src/replay_stage.rs | 2 +- core/src/validator.rs | 2 +- entry/src/entry.rs | 2 +- ledger/src/blockstore.rs | 4 ++-- ledger/src/blockstore_processor.rs | 2 +- ledger/src/shredder.rs | 2 +- ledger/src/sigverify_shreds.rs | 2 +- perf/src/sigverify.rs | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/src/replay_stage.rs b/core/src/replay_stage.rs index 42a06ac133..46aba2c26f 100644 --- a/core/src/replay_stage.rs +++ b/core/src/replay_stage.rs @@ -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(); } diff --git a/core/src/validator.rs b/core/src/validator.rs index 20d7a56876..26980f5c23 100644 --- a/core/src/validator.rs +++ b/core/src/validator.rs @@ -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() { diff --git a/entry/src/entry.rs b/entry/src/entry.rs index 9a1ee0b73f..4e55ea16ec 100644 --- a/entry/src/entry.rs +++ b/entry/src/entry.rs @@ -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(); } diff --git a/ledger/src/blockstore.rs b/ledger/src/blockstore.rs index 74028c2e92..4515ce677c 100644 --- a/ledger/src/blockstore.rs +++ b/ledger/src/blockstore.rs @@ -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(); } diff --git a/ledger/src/blockstore_processor.rs b/ledger/src/blockstore_processor.rs index 01dbc7ac4f..2790312277 100644 --- a/ledger/src/blockstore_processor.rs +++ b/ledger/src/blockstore_processor.rs @@ -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(); } diff --git a/ledger/src/shredder.rs b/ledger/src/shredder.rs index 6c1e6b0b4c..52b3c9295f 100644 --- a/ledger/src/shredder.rs +++ b/ledger/src/shredder.rs @@ -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(); } diff --git a/ledger/src/sigverify_shreds.rs b/ledger/src/sigverify_shreds.rs index 2a73b0d538..b425bc4293 100644 --- a/ledger/src/sigverify_shreds.rs +++ b/ledger/src/sigverify_shreds.rs @@ -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(); } diff --git a/perf/src/sigverify.rs b/perf/src/sigverify.rs index c3ba2759b6..64b3085bfb 100644 --- a/perf/src/sigverify.rs +++ b/perf/src/sigverify.rs @@ -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(); }