[KongchangAI]
Conceptkqueue机制

kqueue

A general-purpose, high-performance event notification framework provided by BSD and macOS kernels. More abstract and versatile in design than epoll, it can monitor multiple event types including sockets, files, signals, and processes, implemented through the kqueue and kevent system calls.

Timeline (last 90 days)

Oct 14

libevent wraps epoll on Linux, kqueue on BSD/macOS, uses /dev/poll or event ports on Solaris, and uses select or IOCP on Windows, and externally provides a unified event_base event loop interface.

Unverified50%
Oct 12

kqueue is an event notification mechanism on BSD/macOS, featuring a filter mechanism.

Unverified50%
Sep 29

The Watched Folders feature technically relies on file system event notification mechanisms provided by macOS, such as FSEvents or kqueue, without requiring the app to continuously poll the disk.

Unverified50%
Sep 22

kqueue originated in FreeBSD and works through two system calls, kqueue and kevent, with kevent handling both registration and event retrieval

Unverified50%
Sep 22

epoll and kqueue follow the same philosophy: register once and wait multiple times, return only active events, and let the kernel proactively notify, making it possible for a single machine to support millions of concurrent connections

Unverified50%
Sep 22

kqueue distinguishes event types via the filter field of the kevent struct, such as EVFILT_READ/WRITE, EVFILT_VNODE, EVFILT_PROC, EVFILT_SIGNAL, and EVFILT_TIMER, allowing unified handling of socket reads/writes, file changes, process state, signals, and timers

Unverified50%
Sep 22

FSEvents and Grand Central Dispatch on macOS, as well as the BSD/macOS platform implementation of libuv, are all built on top of kqueue

Unverified50%

All Facts (7)

Source Articles