You should be able to use: int event_base_loop(struct event_base *, int);
With the flag EVLOOP_NONBLOCK in order to do this. That should dispatch any outstanding events and return as soon as it is out of events. Unless it returns -1 you can just call this whenever you have time. -1 is of course an error so you probably don't want to ignore it. KB > -----Original Message----- > From: [email protected] [mailto:owner-libevent- > [email protected]] On Behalf Of Andrius Bentkus > Sent: Saturday, March 19, 2011 8:30 PM > To: [email protected] > Subject: [Libevent-users] async event_dispatch? > > Hello, > > Is there a non blocking event_dispatch, which can be called every now and > then? > I got a gameserver with a main thread and I could check for events every > now and then, but I would need something like an async event_dispatch *********************************************************************** To unsubscribe, send an e-mail to [email protected] with unsubscribe libevent-users in the body.
