summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Byron <lee@leebyron.com>2019-01-25 10:59:31 -0800
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2019-01-29 02:10:20 +0200
commita0419dd8ca66733e7a4592d98d4f4ebe2f2762e3 (patch)
tree67236493dd6d00a5533b1b8f1181994cd01d2fd4
parent46c5c3388d24615d8bcd887bb366d4171e99fdee (diff)
downloadandroid-node-v8-a0419dd8ca66733e7a4592d98d4f4ebe2f2762e3.tar.gz
android-node-v8-a0419dd8ca66733e7a4592d98d4f4ebe2f2762e3.tar.bz2
android-node-v8-a0419dd8ca66733e7a4592d98d4f4ebe2f2762e3.zip
doc: fix issue with worker_threads docs
This example function returns a promise directly rather than implicitly via async/await. PR-URL: https://github.com/nodejs/node/pull/25712 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
-rw-r--r--doc/api/worker_threads.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md
index 05cafa9cb1..dbf85f9edd 100644
--- a/doc/api/worker_threads.md
+++ b/doc/api/worker_threads.md
@@ -25,7 +25,7 @@ const {
} = require('worker_threads');
if (isMainThread) {
- module.exports = async function parseJSAsync(script) {
+ module.exports = function parseJSAsync(script) {
return new Promise((resolve, reject) => {
const worker = new Worker(__filename, {
workerData: script