]> granicus.if.org Git - libevent/commitdiff
Correctly notify the main thread when activating an event from a subthread
authorNick Mathewson <nickm@torproject.org>
Thu, 2 Dec 2010 02:28:03 +0000 (21:28 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 2 Dec 2010 02:28:03 +0000 (21:28 -0500)
event.c

diff --git a/event.c b/event.c
index 0e711c81bc2869ae1e384a072c27208d41acc15c..fedb9c73cfa293adb776bc3e6815669699880f90 100644 (file)
--- a/event.c
+++ b/event.c
@@ -2240,6 +2240,9 @@ event_active_nolock(struct event *ev, int res, short ncalls)
        }
 
        event_queue_insert(base, ev, EVLIST_ACTIVE);
+
+       if (EVBASE_NEED_NOTIFY(base))
+               evthread_notify_base(base);
 }
 
 void