On Tue, 2009-08-11 at 16:25 -0700, Ka-Hing Cheung wrote:
> Attached is a patch that makes event_base_loop() return 2 if it returns
> because of a prior call to event_base_loopexit() or
> event_base_loopbreak(). This is useful when the caller calls
> event_base_loop(base, EVLOOP_ONCE) repeatedly (to do stuff in between
> events) and need to know if it should exit.
> 
> Patch is against 2.0.2-alpha.
> 

I do realize that this breaks existing assumptions about return values.
What if instead of using a different return value, we don't reset
base->event_gotterm and base->event_break when triggered? We can reset
them at the beginning of event_base_loop() instead.

-khc


_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to