On Wed, Oct 29, 2008 at 3:27 AM, Victor Chang <[EMAIL PROTECTED]> wrote:
> I suppose most typical libevent applications just sit in
> event_base_loop() forever until termination.

FWIW, when I ported Chromium's networking to libevent,
I used EVLOOP_ONCE, so event_base_loop() never
lingers; see
http://src.chromium.org/svn/trunk/src/base/message_pump_libevent.cc
But I don't use libevent's timeouts at all.

(OT: I'm terribly tempted to switch to using edge-triggered
mode (in libevent trunk); that way my app would
never have to do event_set, event_add, or event_del
ever again... I'm a big boy, I can manage my own
state, and it would reduce the number of syscalls.
But I probably won't bother, since the extra syscalls
aren't bothering me right now, and I seem to
have gotten those pesky event masks right.)
- Dan
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to