Skip to content

Deadlock? when using par_bridge() #690

Closed
@gralpli

Description

@gralpli

I'm using rayon 1.2.0 on Windows 10 and rustc 1.36.0 stable. I'm not sure how to best report this bug and I don't even know if it is a bug in rayon at all, but I thought it's better when someone has a look at this. I can provide additional information as requested.

I've written the following code:

use jwalk::WalkDir;

let entries = WalkDir::new(path).into_iter().par_bridge().map(|entry| {
    entry.unwrap().path().display().to_string()
}).collect::<Vec<_>>();

I'm using jwalk 0.4.0; it uses rayon internally.

If I run this code on a big folder (C:\Users\Home or C:\) it sometimes hangs indefinitely in the par_bridge.rs. It tries to aquire the lock on line 165, but always continues with the Err(TryLockError::WouldBlock) match arm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions