Skip to content

Commit 0bd5d8b

Browse files
preveen-stackruyadorno
authored andcommitted
doc: clarify UV_THREADPOOL_SIZE env var usage
Setting of UV_THREADPOOL_SIZE from inside process using process.env.UV_THREADPOOL_SIZE is not guaranteed to work as the thread pool would have been created as part of the runtime initialisation much before user code is run. update doc/api/cli.md PR-URL: #55832 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent a2c8de7 commit 0bd5d8b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/api/cli.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -3489,8 +3489,10 @@ reason any of these APIs takes a long time, other (seemingly unrelated) APIs
34893489
that run in libuv's threadpool will experience degraded performance. In order to
34903490
mitigate this issue, one potential solution is to increase the size of libuv's
34913491
threadpool by setting the `'UV_THREADPOOL_SIZE'` environment variable to a value
3492-
greater than `4` (its current default value). For more information, see the
3493-
[libuv threadpool documentation][].
3492+
greater than `4` (its current default value). However, setting this from inside
3493+
the process using `process.env.UV_THREADPOOL_SIZE=size` is not guranteed to work
3494+
as the threadpool would have been created as part of the runtime initialisation
3495+
much before user code is run. For more information, see the [libuv threadpool documentation][].
34943496

34953497
## Useful V8 options
34963498

0 commit comments

Comments
 (0)