Tor
0.4.7.0-alpha-dev
|
Functions | |
static void | rescan_mainloop_cb (evutil_socket_t fd, short events, void *arg) |
Variables | |
static struct event * | rescan_mainloop_ev = NULL |
If we're not careful, Libevent can susceptible to infinite event chains: one event can activate another, whose callback activates another, whose callback activates another, ad infinitum. While this is happening, Libevent won't be checking timeouts, socket-based events, signals, and so on.
We solve this problem by marking some events as "post-loop". A post-loop event behaves like any ordinary event, but any events that it activates cannot run until Libevent has checked for other events at least once.
|
static |
Callback to implement rescan_mainloop_ev: it simply exits the mainloop, and relies on Tor to re-enter the mainloop since no error has occurred.
Definition at line 109 of file compat_libevent.c.
|
static |
An event that stops Libevent from running any more events on the current iteration of its loop, until it has re-checked for socket events, signal events, timeouts, etc.
Definition at line 102 of file compat_libevent.c.
Referenced by mainloop_event_postloop_cb().