From 888d2ce7d6e8b776fa2a5b6d4c2936ac12455c2f Mon Sep 17 00:00:00 2001 From: Zhaosheng Pan Date: Fri, 16 Aug 2024 21:15:15 +0800 Subject: [PATCH] feat: adjust --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 733fca7..babc116 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,7 @@ type Result = std::result::Result; fn breadth_first_traverse(prog: &str, allow_hidden: bool, follow_links: bool, ignores: &[String], in_queue: &PathQueue, out_queue: &PathQueue) -> Result<()> { loop { - let path = in_queue.pop_timeout(100)?; + let path = in_queue.pop_timeout(200)?; if let Some(path) = path { let entries = fs::read_dir(&path); if let Ok(entries) = entries { @@ -181,7 +181,7 @@ fn main() { let num_threads = { if let Ok(n) = thread::available_parallelism() { - max(n.get() , 16) + n.get() } else { exit(1); }