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

Re: [Libevent-users] Multiple timers handling



Hi Alejandro,
 
I am looking to handle multiple timeout events in single callback.. I don't think it is not avaible today in libevent.
 
I believe i can tag each timer fd (when creating the timer event) to a unique ENUM
so that when my cb is called, i can findout the corresponding timeout ENUM and then handle appropriately...
 
Thanks
Venkat


 
On Fri, Jan 29, 2010 at 9:32 AM, Alejandro Mery <amery@xxxxxxxxxxx> wrote:
On 29/01/10 18:17, Venkatesh Solaiyappan wrote:
Hi:
I am wondering if i can handle multiple timeout events with a single callback (i.e. Managed timers kind of stuff).
Today i see multiple event type (EV_TIMEOUT, EV_READ) are set when cb is called..
But can we distinguish same event type (timeout) but different timers @ app level in a cb.?
Thanks
Venkat

no, but you can make a wrapper callback for io event and another for the timer event and make them call yours.

Best regards,
Alejandro Mery