We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de538cf commit 01f3a7bCopy full SHA for 01f3a7b
frameworks/Rust/hyperlane/src/utils.rs
@@ -1,14 +1,7 @@
1
use super::*;
2
3
pub fn get_thread_count() -> usize {
4
- let cpu_count: usize = num_cpus::get_physical();
5
- let total_threads: usize = num_cpus::get();
6
- let threads_per_cpu: usize = if cpu_count > 0 {
7
- total_threads / cpu_count
8
- } else {
9
- 1
10
- };
11
- cpu_count * threads_per_cpu
+ num_cpus::get().max(1)
12
}
13
14
pub fn escape_html(input: &str) -> String {
0 commit comments