From edc9ceb16e68fbd29e80fa28f5ec9e583e2f9a3a Mon Sep 17 00:00:00 2001 From: Lee Byron Date: Fri, 25 Jan 2019 10:59:31 -0800 Subject: [PATCH] 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(-) diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index 05cafa9cb178e7..dbf85f9edd5082 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