#36 Use ONESHOT support in backends where available

Performance
open
nobody
General (24)
5
2010-01-12
2010-01-12
Nick Mathewson
No

Some backends (notably kqueue and epoll) let us pass a ONESHOT flag when adding an fd. If we managed to use this properly (iow, whenever all events that want to read or write on a given fd are non-persistent), we could save the system call for deleting non-persistent events on bsd and linux based systems.

In epoll, this flag is EPOLLONESHOT. In kqueue, it's EV_ONESHOT

Discussion