diff options
| author | jakka <jakkadoujin@gmail.com> | 2025-07-02 18:35:52 +0300 |
|---|---|---|
| committer | jakka <jakkadoujin@gmail.com> | 2025-07-02 18:35:52 +0300 |
| commit | e38439f8012eabcd827c5abb7b7448a525feaf98 (patch) | |
| tree | 6bdb5a9e45cd1262ccb9c6476d06ac9358fae3c2 /src/main.rs | |
| parent | 7443b2547c2d68ccedf6ed7612d753c9ba91fa25 (diff) | |
added more connections for more threads
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index da62d1e..6d0a3d4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -92,7 +92,9 @@ fn main() -> Result<()> { r.store(false, Ordering::SeqCst); })?; - let dbpool = db::open_db(args.get_one::<PathBuf>("db"))?; + let threads = *args.get_one::<usize>("threads").unwrap(); + + let dbpool = db::open_db(args.get_one::<PathBuf>("db"), threads)?; let path = args.get_one::<PathBuf>("path"); @@ -104,7 +106,7 @@ fn main() -> Result<()> { } let pool = rayon::ThreadPoolBuilder::new() - .num_threads(*args.get_one::<usize>("threads").unwrap()) + .num_threads(threads) .build()?; if let Some(realpath) = path { |
