[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] How to make a eventloop similiar to select() with a timeout of 1sec



On Mon, Jun 24, 2013 at 3:52 AM, åéé <sunyucong@xxxxxxxxx> wrote:
> select() with a timeout of 1 second.
>
> basically I want to wait for as long as 1 second of possible events and move
> on to do other stuff in while(1) loop.

Moving up a level in design space, what is this "other stuff" you need
to do after waiting at most one second?  I ask because it might make
sense to do it on a periodic evtimer *instead*, thus allowing you to
stay inside event_base_loop indefinitely.  That's more in keeping with
the design of the library.

zw
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.