◐ Shell
clean mode source ↗

src: set worker thread name using worker.name · nodejs/node@3579143

Original file line numberDiff line numberDiff line change

@@ -1227,9 +1227,16 @@ changes:

12271227

used for generated code.

12281228

* `stackSizeMb` {number} The default maximum stack size for the thread.

12291229

Small values may lead to unusable Worker instances. **Default:** `4`.

1230-

* `name` {string} An optional `name` to be appended to the worker title

1231-

for debugging/identification purposes, making the final title as

1232-

`[worker ${id}] ${name}`. **Default:** `''`.

1230+

* `name` {string} An optional `name` to be replaced in the thread name

1231+

and to the worker title for debugging/identification purposes,

1232+

making the final title as `[worker ${id}] ${name}`.

1233+

This parameter has a maximum allowed size, depending on the operating

1234+

system. If the provided name exceeds the limit, it will be truncated

1235+

* Maximum sizes:

1236+

* Windows: 32,767 characters

1237+

* macOS: 64 characters

1238+

* Other systems: 16 characters

1239+

**Default:** `'WorkerThread'`.

12331240
12341241

### Event: `'error'`

12351242