kqueue() creates a queue and kevent() both registers interest and fetches ready events. Go’s runtime uses it for network polling on macOS and the BSDs.
kqueue
The BSD and macOS event notification interface, the cousin of Linux epoll.
kqueue() creates a queue and kevent() both registers interest and fetches ready events. Go’s runtime uses it for network polling on macOS and the BSDs.