worker_threads.threadId


当前线程的整数标识符。在相应的工作对象上(如果存在),它可作为 worker.threadId 使用。该值在单个进程内的每个 Worker 实例中都是唯一的。

🌐 An integer identifier for the current thread. On the corresponding worker object (if there is any), it is available as worker.threadId. This value is unique for each Worker instance inside a single process.