32-byte darwin struct kevent, EVFILT_READ/WRITE/TIMER, EV_* flags, and three thin helpers: kev_change (one registration entry), kq_apply (immediate change, no drain), kq_wait (bounded drain, EINTR reissued, negative timeout = forever). Off the std.sx barrel by design — the OS-neutral facade over this and the epoll twin is std.event (S5). examples/1631 pins zero-cost idle timeout, READ readiness with pending byte count + udata round-trip, and EV_EOF on peer close; verified under sx run AND sx build.
5 lines
106 B
Plaintext
5 lines
106 B
Plaintext
idle wait: timeout, 0 events
|
|
after write: READ ready, 4 pending, udata 7777
|
|
after close: EV_EOF
|
|
kqueue ok
|