port.unref()
对端口调用 unref() 允许线程在这是事件系统中唯一活动句柄时退出。如果端口已经被 unref(),再次调用 unref() 则没有效果。
【Calling unref() on a port allows the thread to exit if this is the only
active handle in the event system. If the port is already unref()ed calling
unref() again has no effect.】
如果使用 .on('message') 添加或移除监听器,则根据事件是否存在监听器,端口会自动执行 ref() 和 unref()。
【If listeners are attached or removed using .on('message'), the port is
ref()ed and unref()ed automatically depending on whether
listeners for the event exist.】