libev application stops responding and consumes 100% cpu

Kirill Timofeev kvt at hulu.com
Tue Apr 8 09:53:29 CEST 2014


Hi Konstantin,

while loop was copy pasted from example I used as starting point. While 
loop is needed to run program forever, but looks like adding event 
handlers should be done in the loop as well. Frankly speaking I don't 
understand how all watchers were dropped in my case.

Thanks,
Kirill.

On 04/08/2014 12:49 AM, Konstantin Olkhovskiy wrote:
>
>
> 2014-04-08 11:40 GMT+04:00 Kirill Timofeev <kvt at hulu.com 
> <mailto:kvt at hulu.com>>:
>
>     Could you please point me to code example or documentation
>     regarding current best practice for keeping event loop running
>     forever?
>
>       while (1) {
>             ev_loop(loop, 0);
>         }
>
> ev_loop will run on it's own until it has nothing to do (i.e. no 
> watchers active) with default flags. I do not understand the purpose 
> of infinite while loop around it.
>
>
> -- 
> Regards,
> Konstantin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20140408/85da8029/attachment.html>


More information about the libev mailing list