[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [Libevent-users] How to add a timeout event to the tail of current event list?
On Tue, Sep 3, 2013 at 1:01 PM, Yucong Sun <sunyucong@xxxxxxxxx> wrote:
> Hi Nic,
>
> Thanks for the reply, can you be more specific? Consider follow scenario,
>
> support in time T, socket event A, B, C is ready,
>
> in time T+1, in A's event hander, I created a timer event X, I hope the
> execution order will be
>
> B, C, X,
>
> so that in time T+2 i can have
>
> C, X, Y(created by B's event handler) .
Oh. If the only events that you have active are A, B, and C, then you
can just use event_active() to make new events active. The first one
that you make active (X) will happen after A, B, and C; the second
will have happen after A, B, C, and X.
hth,
--
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.