From a0419dd8ca66733e7a4592d98d4f4ebe2f2762e3 Mon Sep 17 00:00:00 2001 From: Lee Byron Date: Fri, 25 Jan 2019 10:59:31 -0800 Subject: 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 Reviewed-By: Colin Ihrig --- doc/api/worker_threads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') 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 -- cgit v1.2.3