NAN AsyncWorker vs libuv thread pool

48 views
Skip to first unread message

Bill Klein

unread,
Mar 27, 2017, 2:39:53 PM3/27/17
to nodejs
My understanding is that NAN's AsyncWorker makes use of libuv's thread pool which defaults to 4 threads. In my case, some of my node module's AsyncWorkers may run relatively long, though they are not CPU intensive, so I can't limit to 4 threads...

Is there any risk in increasing UV_THREADPOOL_SIZE to the max, apart from how my own AsyncWorkers behave? In the libuv documentation it says that, "the threadpool is global and shared across all event loops," so I assume that other things make use of it and will suffer from degraded performance if there are too many threads available to them...?

Thanks.
Reply all
Reply to author
Forward
0 new messages