From 9a10058e72fb62c3e6ffd82e1f3f393c717e63f5 Mon Sep 17 00:00:00 2001 From: Vlad A Date: Fri, 7 Jun 2019 10:59:44 +0200 Subject: [PATCH] threadpool: increase UV_THREADPOOL_SIZE limit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: Colin Ihrig Reviewed-By: Saúl Ibarra Corretgé --- docs/src/threadpool.rst | 4 +++- src/threadpool.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/src/threadpool.rst b/docs/src/threadpool.rst index 93bd236d..ed41c37f 100644 --- a/docs/src/threadpool.rst +++ b/docs/src/threadpool.rst @@ -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 ``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 function makes use of the threadpool (i.e. when using :c:func:`uv_queue_work`) diff --git a/src/threadpool.c b/src/threadpool.c index 4258933c..7aa57550 100644 --- a/src/threadpool.c +++ b/src/threadpool.c @@ -27,7 +27,7 @@ #include -#define MAX_THREADPOOL_SIZE 128 +#define MAX_THREADPOOL_SIZE 1024 static uv_once_t once = UV_ONCE_INIT; static uv_cond_t cond;