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

Re: [Libevent-users] Program halt after add event



On Thu, Sep 6, 2012 at 6:24 PM, Michael <michaelxmail@xxxxxxxxx> wrote:
> Hi,
>
> I want use libevent as timer management tool in our program. Our program is
> multi-thread , and each thread will use some timer.
>
> I can enter into the call back function after I called the following
> functions:   event_assign(),  event_add(),  event_base_dispatch() , it works
> fine.
>
> But I noticed that after I called the event_add(), the thread will halt,
> after executed the time-out callback function, it will execute the following
> instructions.
>
> for example:  the program will not execute to 'instruction 1' until it has
> executed the timer callback function.
>
> event_add();  //set the timer value
>
> instruntion 1;
>
>
> Is there some functions I need to call to change to non-halt ?

I think I need to see some more detailed code here to understand
what's happening. What you're describing should work, and should not
halt at all.

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