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

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -