]> granicus.if.org Git - libevent/commitdiff
Clarify an important point about event_base_foreach_event()
authorNick Mathewson <nickm@torproject.org>
Fri, 26 Apr 2013 23:15:50 +0000 (19:15 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 26 Apr 2013 23:15:50 +0000 (19:15 -0400)
include/event2/event.h

index b946b00806bf85e2ab55b8e62477f0faddd7cdb3..82015365596ec46bdd26b51ff704283134dfd45b 100644 (file)
@@ -1423,6 +1423,10 @@ typedef int (*event_base_foreach_event_cb)(const struct event_base *, const stru
    event_base_foreach_event() holds a lock on the event_base() for the whole
    time it's running: slow callbacks are not advisable.
 
+   Note that Libevent adds some events of its own to make pieces of its
+   functionality work.  You must not assume that the only events you'll
+   encounter will be the ones you added yourself.
+
    The callback function must return 0 to continue iteration, or some other
    integer to stop iterating.