Skip to content

Commit a831184

Browse files
preveen-stackaduh95
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 bdb6d12 commit a831184

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
@@ -3451,8 +3451,10 @@ reason any of these APIs takes a long time, other (seemingly unrelated) APIs
34513451
that run in libuv's threadpool will experience degraded performance. In order to
34523452
mitigate this issue, one potential solution is to increase the size of libuv's
34533453
threadpool by setting the `'UV_THREADPOOL_SIZE'` environment variable to a value
3454-
greater than `4` (its current default value). For more information, see the
3455-
[libuv threadpool documentation][].
3454+
greater than `4` (its current default value). However, setting this from inside
3455+
the process using `process.env.UV_THREADPOOL_SIZE=size` is not guranteed to work
3456+
as the threadpool would have been created as part of the runtime initialisation
3457+
much before user code is run. For more information, see the [libuv threadpool documentation][].
34563458

34573459
## Useful V8 options
34583460

0 commit comments

Comments
 (0)