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 <k...@hulu.com <mailto:k...@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

_______________________________________________
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to