Permalink
Browse files

doc: fix issue with worker_threads docs

This example function returns a promise directly
rather than implicitly via async/await.

PR-URL: #25712
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information...
leebyron authored and targos committed Jan 25, 2019
1 parent c82f244 commit edc9ceb16e68fbd29e80fa28f5ec9e583e2f9a3a
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit edc9ceb

Please sign in to comment.