Skip to content

v2.7.0

Latest

Choose a tag to compare

@arr2036 arr2036 released this 27 Apr 18:58
4e26305

What's Changed

Improved handling of cross-thread mutations to waiting kqueues on Linux

libkqueue introduces behaviour changes from 2.6.4 which align libkqueue on Linux more closely with the behaviour of FreeBSD and macOS kqueue.

Previously, if thread A was waiting in kevent() on a kq, and thread B called kevent() on the same kq, B would block until A's call returned for an unrelated reason (its own timeout, another event). The visible symptom was that cross-thread wakes from EVFILT_USER didn't actually wake the target loop until something else did, which on idle event loops meant stalls of up to the timer deadline.

Native BSD/macOS kqueue has always allowed concurrent cross-thread kevent() on the same kq. libkqueue now matches. The internal lock that was held across the kernel wait is dropped for the wait and reacquired afterwards.

Solaris/Windows builds keep the previous semantics until they get the same audit and test coverage.

Full Changelog: v2.6.4...v2.7.0