I have been reading around how nodejs uses libuv to perform asynchronous I/O. Reading more about it give me a feeling that it almost sound similar to how select(2) and epoll.
So, my question if I'm using libuv(via node) is it true internally I using select(2) or epoll.
Is libuv is wrapper over select(2) and epoll system call in unix.?
libuv uses the most performant polling mechanism for every platform: that means epoll on Linux, kqueue on macOS and BSDs, /dev/poll on SunOS, etc. One interesting trick libuv does is it uses select() on a thread for some fds kqueue is unable to handle. I gave some details about that here: http://code.saghul.net/index.php/2016/05/24/libuv-internals-the-osx-select2-trick/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With