[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
RE: [Libevent-users] async event_dispatch?
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: owner-libevent-users@xxxxxxxxxxxxx [mailto:owner-libevent-
> users@xxxxxxxxxxxxx] On Behalf Of Andrius Bentkus
> Sent: Saturday, March 19, 2011 8:30 PM
> To: libevent-users@xxxxxxxx
> 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 majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.