summaryrefslogtreecommitdiff
path: root/doc/api/worker_threads.md
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-07-02 00:38:05 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2018-07-02 18:08:17 +0300
commit2ae45240a21f6b78e5ddbb3a2917d5e4ecdb8361 (patch)
tree6e7462334e1b0ad29249b621a53ceb0b8be37dad /doc/api/worker_threads.md
parent4f151228472d80a4583f90aeeaaec1bdc4446fe0 (diff)
downloadandroid-node-v8-2ae45240a21f6b78e5ddbb3a2917d5e4ecdb8361.tar.gz
android-node-v8-2ae45240a21f6b78e5ddbb3a2917d5e4ecdb8361.tar.bz2
android-node-v8-2ae45240a21f6b78e5ddbb3a2917d5e4ecdb8361.zip
doc: fix some links
PR-URL: https://github.com/nodejs/node/pull/21619 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'doc/api/worker_threads.md')
-rw-r--r--doc/api/worker_threads.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md
index 9578403c5c..d20fd0fce5 100644
--- a/doc/api/worker_threads.md
+++ b/doc/api/worker_threads.md
@@ -296,7 +296,7 @@ if (isMainThread) {
console.log('received:', value);
});
} else {
- require('worker_threads').once('workerMessage', (value) => {
+ require('worker_threads').once('message', (value) => {
assert(value.hereIsYourPort instanceof MessagePort);
value.hereIsYourPort.postMessage('the worker is sending this');
value.hereIsYourPort.close();
@@ -377,7 +377,7 @@ added: v10.5.0
* `transferList` {Object[]}
Send a message to the worker that will be received via
-[`require('worker_threads').on('workerMessage')`][].
+[`require('worker_threads').on('message')`][].
See [`port.postMessage()`][] for more details.
### worker.ref()
@@ -467,7 +467,7 @@ active handle in the event system. If the worker is already `unref()`ed calling
[`port.postMessage()`]: #worker_threads_port_postmessage_value_transferlist
[`Worker`]: #worker_threads_class_worker
[`worker.terminate()`]: #worker_threads_worker_terminate_callback
-[`worker.postMessage()`]: #worker_threads_worker_postmessage_value_transferlist_1
+[`worker.postMessage()`]: #worker_threads_worker_postmessage_value_transferlist
[`worker.on('message')`]: #worker_threads_event_message_1
[`worker.threadId`]: #worker_threads_worker_threadid_1
[`port.on('message')`]: #worker_threads_event_message
@@ -480,7 +480,7 @@ active handle in the event system. If the worker is already `unref()`ed calling
[`process.stdout`]: process.html#process_process_stdout
[`process.title`]: process.html#process_process_title
[`require('worker_threads').workerData`]: #worker_threads_worker_workerdata
-[`require('worker_threads').on('workerMessage')`]: #worker_threads_event_workermessage
+[`require('worker_threads').on('message')`]: #worker_threads_event_message_1
[`require('worker_threads').postMessage()`]: #worker_threads_worker_postmessage_value_transferlist
[`require('worker_threads').isMainThread`]: #worker_threads_worker_ismainthread
[`require('worker_threads').parentPort`]: #worker_threads_worker_parentport