summaryrefslogtreecommitdiff
path: root/doc/api/worker_threads.md
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-10-20 11:51:29 +0200
committerMatheus Marchini <mat@mmarchini.me>2018-10-24 11:20:35 -0300
commit5d80ae3acdd812651b3b193cd31e0b81c214b50e (patch)
treeefb0548ce0f26174dee13feeadab072c2c9461e5 /doc/api/worker_threads.md
parent036fbdb63d603a64bd8562ec9331dfb7a5c5075c (diff)
downloadandroid-node-v8-5d80ae3acdd812651b3b193cd31e0b81c214b50e.tar.gz
android-node-v8-5d80ae3acdd812651b3b193cd31e0b81c214b50e.tar.bz2
android-node-v8-5d80ae3acdd812651b3b193cd31e0b81c214b50e.zip
trace_events: forbid tracing modifications from worker threads
Forbid modifying tracing state from worker threads, either through the built-in module or inspector sessions, since the main thread owns all global state, and at least the `async_hooks` integration is definitely not thread safe in its current state. PR-URL: https://github.com/nodejs/node/pull/23781 Fixes: https://github.com/nodejs/node/issues/22767 Refs: https://github.com/nodejs/node/issues/22513 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Diffstat (limited to 'doc/api/worker_threads.md')
-rw-r--r--doc/api/worker_threads.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md
index b73787174c..328bb55c88 100644
--- a/doc/api/worker_threads.md
+++ b/doc/api/worker_threads.md
@@ -253,6 +253,7 @@ Notable differences inside a Worker environment are:
- 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.
Currently, the following differences also exist until they are addressed:
@@ -489,6 +490,7 @@ active handle in the event system. If the worker is already `unref()`ed calling
[`SharedArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
[Signals events]: process.html#process_signal_events
[`Uint8Array`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
+[`trace_events`]: tracing.html
[browser `MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort
[child processes]: child_process.html
[HTML structured clone algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm