worker.ref()


unref() 的相反操作,在先前已经 unref() 的 worker 上调用 ref() 不会让程序在它是唯一活动句柄时退出(默认行为)。如果 worker 已经是 ref() 状态,再次调用 ref() 不会有任何效果。

【Opposite of unref(), calling ref() on a previously unref()ed worker does 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 has no effect.】