Activating/stopping an idle watcher in a prepare/check callback

Gabriel Kerneis kerneis at pps.jussieu.fr
Fri Dec 4 09:52:23 CET 2009


Hi,

if I understand the doc correctly, the following assertions should
stand:
- if I activate a (previously inactive) idle watcher in a *prepare*
  callback, then the associated callback will be called during the
  *current* loop iteration (provided there is nothing else to do of
  higher priority).
- if I activate a (previously inactive) idle watcher in a *check*
  callback, then the associated callback will be called during the
  *next* loop iteration (provided there is nothing else to do of higher
  priority during the next iteration).
- if I stop a (pending) watcher at any time (even in an I/O callback,
  e.g.), the associated callback will not be called (i.e., this is as if
  the event which triggered the stopped watcher never happened).

Am I correct?

Regards,
-- 
Gabriel Kerneis



More information about the libev mailing list