Skip to content

Commit 955690e

Browse files
preveen-stackmarco-ippolito
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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent d6738e9 commit 955690e

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

31713173
### `UV_USE_IO_URING=value`
31723174

0 commit comments

Comments
 (0)