worker.ref()


unref() 相反,如果它是唯一剩下的活动句柄(默认行为),则在先前 unref() 的工作线程上调用 ref() 将不会让程序退出。 如果工作线程是 ref() 的,则再次调用 ref() 将不起作用。

Opposite of unref(), calling ref() on a previously unref()ed worker will not let the program exit if it's the only active handle left (the default behavior). If the worker is ref()ed, calling ref() again will have no effect.