threadpool: increase UV_THREADPOOL_SIZE limit

Increase the UV_THREADPOOL_SIZE limit to 1024 and update the docs.

Fixes: https://github.com/libuv/libuv/pull/2296
PR-URL: https://github.com/libuv/libuv/pull/2314
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
Vlad A 2019-06-07 10:59:44 +02:00 committed by Ben Noordhuis
parent d89bd156cf
commit 9a10058e72
2 changed files with 4 additions and 2 deletions

View File

@ -10,7 +10,9 @@ operations, as well as getaddrinfo and getnameinfo requests.
Its default size is 4, but it can be changed at startup time by setting the Its default size is 4, but it can be changed at startup time by setting the
``UV_THREADPOOL_SIZE`` environment variable to any value (the absolute maximum ``UV_THREADPOOL_SIZE`` environment variable to any value (the absolute maximum
is 128). is 1024).
.. versionchanged:: 1.29.2 the maximum UV_THREADPOOL_SIZE allowed was increased from 128 to 1024.
The threadpool is global and shared across all event loops. When a particular The threadpool is global and shared across all event loops. When a particular
function makes use of the threadpool (i.e. when using :c:func:`uv_queue_work`) function makes use of the threadpool (i.e. when using :c:func:`uv_queue_work`)

View File

@ -27,7 +27,7 @@
#include <stdlib.h> #include <stdlib.h>
#define MAX_THREADPOOL_SIZE 128 #define MAX_THREADPOOL_SIZE 1024
static uv_once_t once = UV_ONCE_INIT; static uv_once_t once = UV_ONCE_INIT;
static uv_cond_t cond; static uv_cond_t cond;