From 41cfc326027d542aa11ef45f0c3d0cbfd26c097d 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 73cd29538da91f..e2b165ce0e8b1f 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.