Skip to content

Commit 56efaa6

Browse files
committed
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
1 parent 598bbf4 commit 56efaa6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/api/cli.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3450,8 +3450,10 @@ reason any of these APIs takes a long time, other (seemingly unrelated) APIs
34503450
that run in libuv's threadpool will experience degraded performance. In order to
34513451
mitigate this issue, one potential solution is to increase the size of libuv's
34523452
threadpool by setting the `'UV_THREADPOOL_SIZE'` environment variable to a value
3453-
greater than `4` (its current default value). For more information, see the
3454-
[libuv threadpool documentation][].
3453+
greater than `4` (its current default value). However, setting this from inside
3454+
the process using `process.env.UV_THREADPOOL_SIZE=size` is not guranteed to work
3455+
as the threadpool would have been created as part of the runtime initialisation
3456+
much before user code is run. For more information, see the [libuv threadpool documentation][].
34553457

34563458
## Useful V8 options
34573459

0 commit comments

Comments
 (0)