worker.threadName
引用线程的字符串标识符,如果线程未运行,则为 null。在工作线程内部,它作为 require('node:worker_threads').threadName
可用。
¥A string identifier for the referenced thread or null if the thread is not running.
Inside the worker thread, it is available as require('node:worker_threads').threadName
.