ignore: allow parallel walker to borrow data

This makes it so the caller can more easily refactor from
single-threaded to multi-threaded walking. If they want to support both,
this makes it easier to do so with a single initialization code-path. In
particular, it side-steps the need to put everything into an `Arc`.

This is not a breaking change because it strictly increases the number
of allowed inputs to `WalkParallel::run`.

Closes #1410, Closes #1432
This commit is contained in:
Ed Page
2019-10-26 19:02:10 -06:00
committed by Andrew Gallant
parent 5c1eac41a3
commit 9f7c2ebc09
3 changed files with 79 additions and 64 deletions

1
Cargo.lock generated
View File

@@ -238,6 +238,7 @@ name = "ignore"
version = "0.4.11"
dependencies = [
"crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"globset 0.4.4",
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",