You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't a bug report, so I'm not sure if this is the correct place to put this. Please redirect me if necessary.
I'm working on adding file-watching support to a Rollup plugin (rollup-plugin-copy) using Chokidar (see this discussion for why we want to use Chokidar: vladshcherbin/rollup-plugin-copy#27 (comment)), and I'm wondering if I need to make sure I call FSWatcher.close() before the process exits. If so, I'm not sure what the recommended way to do so is, because using process.on('exit', ...) requires the callback to be synchronous (see https://nodejs.org/api/process.html#process_event_exit), but FSWatcher.close() is async.
Since I'm here, I'm also curious regarding the best practices for creating more than one FSWatcher instance VS creating a single master FSWatcher with all of the paths you care about. Is there a significant performance cost for creating multiple watchers?
The text was updated successfully, but these errors were encountered:
This isn't a bug report, so I'm not sure if this is the correct place to put this. Please redirect me if necessary.
I'm working on adding file-watching support to a Rollup plugin (rollup-plugin-copy) using Chokidar (see this discussion for why we want to use Chokidar: vladshcherbin/rollup-plugin-copy#27 (comment)), and I'm wondering if I need to make sure I call
FSWatcher.close()
before the process exits. If so, I'm not sure what the recommended way to do so is, because usingprocess.on('exit', ...)
requires the callback to be synchronous (see https://nodejs.org/api/process.html#process_event_exit), butFSWatcher.close()
is async.Since I'm here, I'm also curious regarding the best practices for creating more than one
FSWatcher
instance VS creating a single masterFSWatcher
with all of the paths you care about. Is there a significant performance cost for creating multiple watchers?The text was updated successfully, but these errors were encountered: