File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ use rasn_arrow::IpRangeTableV4;
1717use rasn_core:: AsnInfo ;
1818use rasn_resolver:: DnsResolver ;
1919
20+ /// Number of CPU cores available
21+ fn num_cpus_get ( ) -> usize {
22+ num_cpus:: get ( )
23+ }
24+
2025/// Batch processing result
2126#[ derive( Debug , Clone ) ]
2227pub struct BatchResult {
@@ -39,7 +44,7 @@ impl BatchProcessor {
3944 /// * `arrow_path` - Optional path to Arrow/Parquet data
4045 /// * `num_threads` - Number of threads (default: CPU cores * 2)
4146 pub fn new ( arrow_path : Option < & Path > , num_threads : Option < usize > ) -> Result < Self > {
42- let num_threads = num_threads. unwrap_or_else ( || num_cpus :: get ( ) * 2 ) ;
47+ let num_threads = num_threads. unwrap_or_else ( || num_cpus_get ( ) * 2 ) ;
4348
4449 let thread_pool = rayon:: ThreadPoolBuilder :: new ( )
4550 . num_threads ( num_threads)
You can’t perform that action at this time.
0 commit comments