watcher.unref()
- 返回: <fs.StatWatcher>
调用时,活动的 StatWatcher
对象不需要 Node.js 事件循环保持活动状态。
如果没有其他活动保持事件循环运行,则进程可能会在调用 StatWatcher
对象的回调之前退出。
多次调用 watcher.unref()
将不起作用。
- Returns: <fs.StatWatcher>
When called, the active StatWatcher
object will not require the Node.js
event loop to remain active. If there is no other activity keeping the
event loop running, the process may exit before the StatWatcher
object's
callback is invoked. Calling watcher.unref()
multiple times will have
no effect.