worker.unref()


如果这是事件系统中唯一的活动句柄,则在工作线程上调用 unref() 将允许线程退出。 如果工作线程已经 unref(),则再次调用 unref() 将无效。

Calling unref() on a worker will allow the thread to exit if this is the only active handle in the event system. If the worker is already unref()ed calling unref() again will have no effect.