@@ -721,6 +721,17 @@ An integer identifier for the current thread. On the corresponding worker object
721721(if there is any), it is available as [`worker.threadId`][].
722722This value is unique for each [`Worker`][] instance inside a single process.
723723
724+ ## `worker.threadName`
725+
726+ <!-- YAML
727+ added: REPLACEME
728+ -->
729+
730+ * {string|null}
731+
732+ A string identifier for the current thread or null if the thread is not running.
733+ On the corresponding worker object (if there is any), it is available as [`worker.threadName`][].
734+
724735## `worker.workerData`
725736
726737<!-- YAML
@@ -2015,6 +2026,17 @@ An integer identifier for the referenced thread. Inside the worker thread,
20152026it is available as [` require('node:worker_threads').threadId` ][].
20162027This value is unique for each ` Worker` instance inside a single process .
20172028
2029+ ### ` worker.threadName`
2030+
2031+ <!-- YAML
2032+ added: REPLACEME
2033+ -->
2034+
2035+ * {string| null }
2036+
2037+ A string identifier for the referenced thread or null if the thread is not running.
2038+ Inside the worker thread, it is available as [` require('node:worker_threads').threadName` ][].
2039+
20182040### ` worker.unref()`
20192041
20202042<!-- YAML
@@ -2143,6 +2165,7 @@ thread spawned will spawn another until the application crashes.
21432165[` require('node:worker_threads').parentPort.postMessage()` ]: #workerpostmessagevalue- transferlist
21442166[` require('node:worker_threads').parentPort` ]: #workerparentport
21452167[` require('node:worker_threads').threadId` ]: #workerthreadid
2168+ [` require('node:worker_threads').threadName` ]: #workerthreadname
21462169[` require('node:worker_threads').workerData` ]: #workerworkerdata
21472170[` trace_events` ]: tracing .md
21482171[` v8.getHeapSnapshot()` ]: v8 .md #v8getheapsnapshotoptions
@@ -2153,6 +2176,7 @@ thread spawned will spawn another until the application crashes.
21532176[` worker.postMessage()` ]: #workerpostmessagevalue- transferlist
21542177[` worker.terminate()` ]: #workerterminate
21552178[` worker.threadId` ]: #workerthreadid_1
2179+ [` worker.threadName` ]: #workerthreadname_1
21562180[async - resource- worker- pool]: async_context .md #using- asyncresource- for - a- worker- thread- pool
21572181[browser ` LockManager` ]: https: // developer.mozilla.org/en-US/docs/Web/API/LockManager
21582182[browser ` MessagePort` ]: https: // developer.mozilla.org/en-US/docs/Web/API/MessagePort
0 commit comments