summaryrefslogtreecommitdiff
path: root/doc/api/worker_threads.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/worker_threads.md')
-rw-r--r--doc/api/worker_threads.md34
1 files changed, 17 insertions, 17 deletions
diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md
index 99aa276f58..023d41db29 100644
--- a/doc/api/worker_threads.md
+++ b/doc/api/worker_threads.md
@@ -304,13 +304,13 @@ the [HTML structured clone algorithm][].
In particular, the significant differences to `JSON` are:
-- `value` may contain circular references.
-- `value` may contain instances of builtin JS types such as `RegExp`s,
+* `value` may contain circular references.
+* `value` may contain instances of builtin JS types such as `RegExp`s,
`BigInt`s, `Map`s, `Set`s, etc.
-- `value` may contain typed arrays, both using `ArrayBuffer`s
+* `value` may contain typed arrays, both using `ArrayBuffer`s
and `SharedArrayBuffer`s.
-- `value` may contain [`WebAssembly.Module`][] instances.
-- `value` may not contain native (C++-backed) objects other than `MessagePort`s.
+* `value` may contain [`WebAssembly.Module`][] instances.
+* `value` may not contain native (C++-backed) objects other than `MessagePort`s.
```js
const { MessageChannel } = require('worker_threads');
@@ -424,26 +424,26 @@ Most Node.js APIs are available inside of it.
Notable differences inside a Worker environment are:
-- The [`process.stdin`][], [`process.stdout`][] and [`process.stderr`][]
+* The [`process.stdin`][], [`process.stdout`][] and [`process.stderr`][]
may be redirected by the parent thread.
-- The [`require('worker_threads').isMainThread`][] property is set to `false`.
-- The [`require('worker_threads').parentPort`][] message port is available.
-- [`process.exit()`][] does not stop the whole program, just the single thread,
+* The [`require('worker_threads').isMainThread`][] property is set to `false`.
+* The [`require('worker_threads').parentPort`][] message port is available.
+* [`process.exit()`][] does not stop the whole program, just the single thread,
and [`process.abort()`][] is not available.
-- [`process.chdir()`][] and `process` methods that set group or user ids
+* [`process.chdir()`][] and `process` methods that set group or user ids
are not available.
-- [`process.env`][] is a copy of the parent thread's environment variables,
+* [`process.env`][] is a copy of the parent thread's environment variables,
unless otherwise specified. Changes to one copy will not be visible in other
threads, and will not be visible to native add-ons (unless
[`worker.SHARE_ENV`][] has been passed as the `env` option to the
[`Worker`][] constructor).
-- [`process.title`][] cannot be modified.
-- Signals will not be delivered through [`process.on('...')`][Signals events].
-- Execution may stop at any point as a result of [`worker.terminate()`][]
+* [`process.title`][] cannot be modified.
+* Signals will not be delivered through [`process.on('...')`][Signals events].
+* Execution may stop at any point as a result of [`worker.terminate()`][]
being invoked.
-- IPC channels from parent processes are not accessible.
-- The [`trace_events`][] module is not supported.
-- Native add-ons can only be loaded from multiple threads if they fulfill
+* IPC channels from parent processes are not accessible.
+* The [`trace_events`][] module is not supported.
+* Native add-ons can only be loaded from multiple threads if they fulfill
[certain conditions][Addons worker support].
Creating `Worker` instances inside of other `Worker`s is possible.