#53 "Nonreentrant" callbacks rather than "deferred" callbacks

open
nobody
None
5
2010-12-14
2010-12-14
Nick Mathewson
No

Explicitly labeling callbacks "deferred" is Libevent 2.0's current solution to avoid reentrant callback situations where callbacks can get called from inside each other, Libevent code can get used reentrantly in strange and unexpected ways, and so on. But mostly this is excessive: what we want to enforce is that the callback not be called from inside another user callback or from inside user code. If deferring callbacks turns out to matter in performacne, there is probably some way to avoid doing so by marking callbacks as "not for reentrant use" rather than "always defer this".

Discussion