linux - read() returns EAGAIN after epoll reported EPOLLIN for timerfd -
i use timerfd tfd_nonblock option.
this timer added epoll controller epollin event set. if epollin occurs, read() used on timer.
in 99% cases works great. execution stops on epoll_wait, continued after timer interval. under heavy system load received eagain read() few times.
this looks receive epollin nothing availible reading.
i probably found answer.
in program using few timers @ once, of them modifying intervals of others. little or no load epoll executing single event @ once. under heavy load events queued , executed in loop. while processing queue, if first event modified interval of next timer - became 'not-ready'. loop proceeded second timer, causing read() on not-ready-anymore timer.
Comments
Post a Comment