From c267bb219207cae7cf6918f6701a9648d42431a8 Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Fri, 31 Dec 2021 05:16:14 +0500 Subject: [PATCH] doc: fix example description for worker_threads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/41341 Reviewed-By: Colin Ihrig Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca Reviewed-By: Tobias Nießen Reviewed-By: Franziska Hinkelmann Reviewed-By: Harshitha K P Reviewed-By: Mohammed Keyvanzadeh --- 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 106efca846f15b..86374d8fcc3c81 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -47,7 +47,7 @@ if (isMainThread) { } ``` -The above example spawns a Worker thread for each `parse()` call. In actual +The above example spawns a Worker thread for each `parseJSAsync()` call. In practice, use a pool of Workers for these kinds of tasks. Otherwise, the overhead of creating Workers would likely exceed their benefit.