ev_timer problem

vvvua vvvua at faust.net.ua
Mon Jul 7 14:54:21 CEST 2008


Marc Lehmann wrote:
> I suspect that there simply is no place where you restart it, or stop it,
> which would explain your problem.
>
>   
Now all works fine.
The problem was:
ev_loop is in main thread, timers are in second thread.

When ev_loop finishes to maintain all registered timers, it waits on 
epoll, and epoll waits for events from sockets.
When i register a new timer in the second thread, ev_loop still waits on 
epoll...
My timer works only in next cycle .
To resolve this problem i created a heartbeat timer in the main thread.
Another solution - is to set timeout on sockets read/write operations.

Thanks.



More information about the libev mailing list