rust: Name the Rayon threads
This commit is contained in:
parent
bc19797125
commit
dd7370cfcb
|
@ -2391,6 +2391,7 @@ dependencies = [
|
|||
"log-panics",
|
||||
"orchard",
|
||||
"paranoid-android",
|
||||
"rayon",
|
||||
"schemer",
|
||||
"secp256k1",
|
||||
"secrecy",
|
||||
|
|
|
@ -26,6 +26,9 @@ zcash_primitives = "0.11"
|
|||
zcash_proofs = "0.11"
|
||||
orchard = { version = "0.4", default-features = false }
|
||||
|
||||
# Initialization
|
||||
rayon = "1.7"
|
||||
|
||||
# Logging
|
||||
log-panics = "2.0.0"
|
||||
paranoid-android = "0.2"
|
||||
|
|
|
@ -126,7 +126,13 @@ pub unsafe extern "C" fn Java_cash_z_ecc_android_sdk_internal_jni_RustBackend_in
|
|||
error!("Failed to reload tracing subscriber with NDK APIs: {}", e);
|
||||
}
|
||||
|
||||
debug!("logs have been initialized successfully");
|
||||
// Manually build the Rayon thread pool, so we can name the threads.
|
||||
rayon::ThreadPoolBuilder::new()
|
||||
.thread_name(|i| format!("zc-rayon-{}", i))
|
||||
.build_global()
|
||||
.expect("Only initialized once");
|
||||
|
||||
debug!("Rust backend has been initialized successfully");
|
||||
print_debug_state();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue