Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Merely calling require("pathwatcher") keeps the process from exiting #47

@benjamn

Description

@benjamn

Minimal repro: node -e 'require("pathwatcher")'

The default behavior seems to be similar to calling fs.watch(file, { persistent: true }), which keeps the event loop alive until all watchers are closed. I would love to have the ability to make pathwatcher.watch non-persistent.

From brief examination, it seems like we need to be calling uv_run(loop, UV_RUN_NOWAIT) somewhere, perhaps instead of uv_async_init(uv_default_loop(), &g_async, MakeCallbackInMainThread), but I'm far from certain about that.

For what it's worth, I'm a Meteor core developer, and I'm trying to incorporate pathwatcher into the Meteor development server, to address meteor/meteor#2135.

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