kqueue
The event notification facility on macOS and BSD systems, doing the job epoll does on Linux and also reporting file changes.
In more detail
libuv uses kqueue on macOS to learn when sockets are ready. For watching files on macOS, libuv uses kqueue or the FSEvents service.
Related terms
- epoll — The Linux kernel facility that lets one thread watch many file descriptors and be told which are ready for reading or writing.
- event demultiplexer — The part of libuv that waits on many sockets and files at once and reports which of them are ready, using facilities such as epoll.
- fs.watch() — The Node.js function that reports changes to a file or directory using the operating system's notification system.
Taught in
- libuv Architecture: Event Demultiplexer & Thread Pool — Node.js Internals & Backend Services
- Poll & Check Phases: I/O Callbacks & setImmediate — Node.js Internals & Backend Services
- Directory Traversal: Recursive Readdir & fs.watch — Node.js Internals & Backend Services