]> granicus.if.org Git - libevent/commit
Detect and refuse reentrant event_base_loop() calls
authorNick Mathewson <nickm@torproject.org>
Sun, 21 Mar 2010 17:28:48 +0000 (13:28 -0400)
committerNick Mathewson <nickm@torproject.org>
Sun, 21 Mar 2010 17:28:48 +0000 (13:28 -0400)
commitb557b175c00dc462c1fce25f6e7dd67121d2c001
treec64599730c5c37b55264f77211d18aa7c4d21e7e
parentfb366c1d880e49a19c40c9d62cbd7cbef297c6e7
Detect and refuse reentrant event_base_loop() calls

Calling event_base_loop on a base from inside a callback invoked by
that same base, or from two threads at once, has long been a way to
get exceedingly hard-to-diagnose errors.  This patch adds code to
detect such reentrant invocatinos, and exit quickly with a warning
that should explain what went wrong.
event-internal.h
event.c
test/regress.c