@@ -715,6 +715,17 @@ An integer identifier for the current thread. On the corresponding worker object
715715(if there is any), it is available as [`worker.threadId`][].
716716This value is unique for each [`Worker`][] instance inside a single process.
717717
718+ ## `worker.threadName`
719+
720+ <!-- YAML
721+ added: REPLACEME
722+ -->
723+
724+ * {string|null}
725+
726+ A string identifier for the current thread or null if the thread is not running.
727+ On the corresponding worker object (if there is any), it is available as [`worker.threadName`][].
728+
718729## `worker.workerData`
719730
720731<!-- YAML
@@ -1849,6 +1860,17 @@ An integer identifier for the referenced thread. Inside the worker thread,
18491860it is available as [` require('node:worker_threads').threadId` ][].
18501861This value is unique for each ` Worker` instance inside a single process .
18511862
1863+ ### ` worker.threadName`
1864+
1865+ <!-- YAML
1866+ added: REPLACEME
1867+ -->
1868+
1869+ * {string| null }
1870+
1871+ A string identifier for the referenced thread or null if the thread is not running.
1872+ Inside the worker thread, it is available as [` require('node:worker_threads').threadName` ][].
1873+
18521874### ` worker.unref()`
18531875
18541876<!-- YAML
@@ -1969,6 +1991,7 @@ thread spawned will spawn another until the application crashes.
19691991[` require('node:worker_threads').parentPort.postMessage()` ]: #workerpostmessagevalue- transferlist
19701992[` require('node:worker_threads').parentPort` ]: #workerparentport
19711993[` require('node:worker_threads').threadId` ]: #workerthreadid
1994+ [` require('node:worker_threads').threadName` ]: #workerthreadname
19721995[` require('node:worker_threads').workerData` ]: #workerworkerdata
19731996[` trace_events` ]: tracing .md
19741997[` v8.getHeapSnapshot()` ]: v8 .md #v8getheapsnapshotoptions
@@ -1979,6 +2002,7 @@ thread spawned will spawn another until the application crashes.
19792002[` worker.postMessage()` ]: #workerpostmessagevalue- transferlist
19802003[` worker.terminate()` ]: #workerterminate
19812004[` worker.threadId` ]: #workerthreadid_1
2005+ [` worker.threadName` ]: #workerthreadname_1
19822006[async - resource- worker- pool]: async_context .md #using- asyncresource- for - a- worker- thread- pool
19832007[browser ` MessagePort` ]: https: // developer.mozilla.org/en-US/docs/Web/API/MessagePort
19842008[child processes]: child_process .md
0 commit comments