Skip to content
Myr

ignore: another simplification

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Again, thanks to @zsugabubus!

authored by Andrew Gallant · committed by Andrew Gallant · parent 109460f · Browse files · 1 file+1 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:crates/ignore/src/walk.rs+1 added-2 removed
1193 unmodified lines
1194 // We probably need to rethink parallel traversal completely to fix1195 // this. The best case scenario would be finding a way to use rayon1196 // to do this.1197 let (tx, rx) = channel::unbounded();1198 let num_pending = Arc::new(AtomicUsize::new(0));1198 {1199 let mut visitor = builder.build();1200 let mut paths = Vec::new().into_iter();1201 std::mem::swap(&mut paths, &mut self.paths);
29 unmodified lines
1231 continue;1232 }1233 }1234 };1236 num_pending.fetch_add(1, Ordering::SeqCst);1235 tx.send(Message::Work(Work {1236 dent: dent,1237 ignore: self.ig_root.clone(),1238 root_device: root_device,
6 unmodified lines
1245 }1246 }1247 // Create the workers and then wait for them to finish.1248 let quit_now = Arc::new(AtomicBool::new(false));1249 let num_pending = Arc::new(AtomicUsize::new(tx.len()));1250 crossbeam_utils::thread::scope(|s| {1251 let mut handles = vec![];1252 for _ in 0..threads {1253 let worker = Worker {
911 unmodified lines