On Wed, Apr 03, 2013 at 09:54:46AM +1100, Varun Chandramohan <cvarunen...@gmail.com> wrote: > question, so at line 78 if I removed if (events & EV_TIMEOUT) { } > check will it be an issue. I dont see anything else calling this call back > apart from this event. May be EV_ERROR perhaps?
The revents should only contain the bit flag for the event you asked for, and EV_ERROR, at least from libevs side (you can feed other events manually, or combine masks). Now, regardless of receiving an error, you can always stop a watcher that has been initialised, whether libev knows about it or not, so calling stop functions is safe. In addition, EV_ERROR usually means a programming error, so you never need to check for it in a correctly wirtten program :) You can just assume that a timer will always get an EV_TIMEOUT revents. > Will you be able to tell me theoretically what was going on? I still not > aware of what exactly went wrong. Also I have been > using this manual http://doc.dvgu.ru/devel/ev.html for development. I could For some reason, that russian site is very popular, but has a completely outdated libev library and documentation. However, the antique libev version on that side at least should match the documentation. The documentation, incidentally, links to the most up-to-date version of the docs in the DESCRIPTION: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schm...@schmorp.de -=====/_/_//_/\_,_/ /_/\_\ _______________________________________________ libev mailing list libev@lists.schmorp.de http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev