QuizNot attempted
What uses the thread pool?
1–4 to choose, Enter to submit
Show answer & explanation
Correct answers:
- Most
fsfile operations crypto.pbkdf2/crypto.randomBytesand zlib compressiondns.lookup
- libuv's pool handles work the OS can't do asynchronously: most
fsoperations, CPU-heavycrypto(pbkdf2,randomBytes,scrypt), zlib, anddns.lookup(it calls the blockinggetaddrinfo). - Not TCP/HTTP socket I/O: network sockets use the OS's non-blocking mechanisms (epoll/kqueue/IOCP) directly on the main loop.
- Raise
UV_THREADPOOL_SIZEif many pool tasks run concurrently.