diff options
author | Lee Byron <lee@leebyron.com> | 2019-01-25 10:59:31 -0800 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2019-01-29 02:10:20 +0200 |
commit | a0419dd8ca66733e7a4592d98d4f4ebe2f2762e3 (patch) | |
tree | 67236493dd6d00a5533b1b8f1181994cd01d2fd4 /doc | |
parent | 46c5c3388d24615d8bcd887bb366d4171e99fdee (diff) | |
download | android-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>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/worker_threads.md | 2 |
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 |