This file implements part of the event(3) libevent api. More...
Functions | |
int | mini_ev_cmp (const void *a, const void *b) |
compare events in tree, based on timevalue, ptr for uniqueness | |
This file implements part of the event(3) libevent api.
The back end is only select. Max number of fds is limited. Max number of signals is limited, one handler per signal only. And one handler per fd.
Although limited to select() and a max (1024) open fds, it is efficient: o dispatch call caches fd_sets to use. o handler calling takes time ~ to the number of fds. o timeouts are stored in a redblack tree, sorted, so take log(n). Timeouts are only accurate to the second (no subsecond accuracy). To avoid cpu hogging, fractional timeouts are rounded up to a whole second.