]> granicus.if.org Git - libevent/commit
Add "active later" event_callbacks to supersede deferred
authorNick Mathewson <nickm@torproject.org>
Fri, 6 Apr 2012 07:00:40 +0000 (03:00 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 9 May 2012 16:05:53 +0000 (12:05 -0400)
commit745a63dba33c53440064908f086bb739aa9c4bb3
treee667a081f3316ccbb6d92d93c8603476b67e9c01
parent9889a3d883d99c644f00398c3a6a11a9037e8117
Add "active later" event_callbacks to supersede deferred

An event or event callback can now be in an additional state: "active
later".  When an event is in this state, it will become active the
next time we run through the event loop.  This lets us do what we
wanted to with deferred callbacks: make a type of active thing that
avoids infinite circular regress in a way that starves other events or
exhausts the stack.  It improves on deferred callbacks by respecting
priorities, and by having a non-kludgy way to avoid event starvation.
event-internal.h
event.c
include/event2/event_struct.h
test/regress.c