Function walk_parallel

Source
pub fn walk_parallel(
    ignore_rules: Arc<RwLock<IgnoreRules>>,
    dir: &Path,
    walk_options: WalkOptions,
    path_sender: Sender<Result<PathMetadata, Error>>,
) -> Result<(), Error>
Expand description

Walk all child paths under dir and send non-ignored paths to path_sender. Newly found ignore rules are sent through ignore_sender. The ignore file name (.xvcignore, .gitignore, .ignore, …) is set by walk_options.

It lists elements of a directory, then creates a new crossbeam scope for each child directory and calls itself recursively. It may not be feasible for small directories to create threads.