From 51f3c1fb654abeb28c3f0c78bdf4947a0b04b78b Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Mon, 27 Dec 2021 22:15:18 +0500 Subject: [PATCH 1/3] doc: fix example description for worker_threads --- 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 32285e9eac35d5..703abc111fd721 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 actual practice, use a pool of Workers for these kinds of tasks. Otherwise, the overhead of creating Workers would likely exceed their benefit. From 8fad3d94135c004845850238a839ef04b7ad601f Mon Sep 17 00:00:00 2001 From: krutoo Date: Mon, 27 Dec 2021 22:31:44 +0500 Subject: [PATCH 2/3] doc: fix linter issue in worker_threads --- doc/api/worker_threads.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index 703abc111fd721..7b63f663039f14 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -47,8 +47,8 @@ if (isMainThread) { } ``` -The above example spawns a Worker thread for each `parseJSAsync()` call. In actual -practice, use a pool of Workers for these kinds of tasks. Otherwise, the +The above example spawns a Worker thread for each `parseJSAsync()` call. In +actual practice, use a pool of Workers for these kinds of tasks. Otherwise, the overhead of creating Workers would likely exceed their benefit. When implementing a worker pool, use the [`AsyncResource`][] API to inform From 23ed378e5993913f76fa8e8e02eaf13df362070e Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Mon, 27 Dec 2021 22:44:08 +0500 Subject: [PATCH 3/3] doc: sentence fix in worker_threads Co-authored-by: Antoine du Hamel --- 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 7b63f663039f14..cc0987211750ca 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -48,7 +48,7 @@ if (isMainThread) { ``` The above example spawns a Worker thread for each `parseJSAsync()` call. In -actual practice, use a pool of Workers for these kinds of tasks. Otherwise, the +practice, use a pool of Workers for these kinds of tasks. Otherwise, the overhead of creating Workers would likely exceed their benefit. When implementing a worker pool, use the [`AsyncResource`][] API to inform