lukeed/tidyPublic

feat: tidy_walk crate

A std-only parallel walk that reads each wanted file, runs the
caller's work on it, and writes back what the work returns, with
results and errors sorted by path. Designed with mdtidy, which will
use it when it merges in, and reviewed independently.

On macOS, opening files stops scaling at about 4 threads system
wide, so 4 I/O threads feed workers on every core. Elsewhere the
I/O threads run the work. Arguments count once by (dev, ino), an
argument in a walked folder is handled under its own spelling even
behind a skipped folder, links found while walking aren't followed,
hard-linked files are worked on once, and a panic is an error for
its file.
LELuke Edwards authored
ee918a8Patch
Parentb5cd55b
7 files changed+968-1
StackedSplit
Cargo.lock+5 −0
Cargo.toml+2 −1
crates/tidy_walk/Cargo.toml+11 −0
crates/tidy_walk/src/lib.rs+184 −0
crates/tidy_walk/src/plan.rs+82 −0
crates/tidy_walk/src/pool.rs+440 −0
crates/tidy_walk/tests/walk.rs+244 −0