libuv 是在 unix 中使用 epoll 还是 select(2)
Is libuv under the hood use epoll or select(2) in unix
我一直在阅读 nodejs 如何使用 libuv 执行异步 I/O。阅读更多关于它的内容让我觉得它听起来几乎与 select(2) 和 epoll.
相似
所以,我的问题是,如果我使用 libuv(通过节点),我在内部使用 select(2) 或 epoll 是真的吗?
libuv 是 unix 中 select(2) 和 epoll 系统调用的包装器吗?
libuv 为每个平台使用了最高效的轮询机制:这意味着在 Linux 上使用 epoll,在 macOS 和 BSD 上使用 kqueue,在 SunOS 上使用 /dev/poll,等等。libuv 的一个有趣的技巧是它使用select() on a thread for some fds kqueue is unable to handle.我在这里给出了一些细节:http://code.saghul.net/index.php/2016/05/24/libuv-internals-the-osx-select2-trick/
我一直在阅读 nodejs 如何使用 libuv 执行异步 I/O。阅读更多关于它的内容让我觉得它听起来几乎与 select(2) 和 epoll.
相似所以,我的问题是,如果我使用 libuv(通过节点),我在内部使用 select(2) 或 epoll 是真的吗?
libuv 是 unix 中 select(2) 和 epoll 系统调用的包装器吗?
libuv 为每个平台使用了最高效的轮询机制:这意味着在 Linux 上使用 epoll,在 macOS 和 BSD 上使用 kqueue,在 SunOS 上使用 /dev/poll,等等。libuv 的一个有趣的技巧是它使用select() on a thread for some fds kqueue is unable to handle.我在这里给出了一些细节:http://code.saghul.net/index.php/2016/05/24/libuv-internals-the-osx-select2-trick/