Skip to content

Deadlock due to race in FsEventWatcher #118

@michaelfairley

Description

@michaelfairley

Because the runloop thread signals that the runloop has started before CFRunLoopStart is called, it's possible for CFRunLoopStop to get called before CFRunLoopStart, causing the runloop to never stop and thus the done channel to be waited on forever.

In practice, if I have two watch commands back to back, I get a deadlock roughly 10% of the time on my Mac.

I have a somewhat cheesy workaround that I'm using right now, but an ideal solution probably involves CFRunLoopObserver or somesuch.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions