sorry, i misunderstood what i was reading, but thanks.
with that resolved, i do have a couple of other questions: 1. when using signal_add(), how does the timeout parameter affect the signal handler? i've set it to handle sigalrm and a timeout of 2. if i send the process sigalrm, nothing happens. i wait 2 seconds and nothing happens. but if i set it to 0, then it responds to my sigalrm's that i send it 2. when using struct event to event_set and event_add, am i supposed to use a different struct for each event? i ask because i am setting an event for a fd and one for a signal. when i use the same event for both, i get errors. the errors are also different depending on the timeout value that i pass to the signal handler. if i pass a valid struct timeval to the signal_add, i'll get an abort and the program will dump core. if i pass it a 0 timeout value, i get an error about not being on the queue. sorry if this is something i should know. i'm just not understanding the documentation very well. thanks in advance for your help! On 2/8/07, Niels Provos <[EMAIL PROTECTED]> wrote:
libevent doesn't do any pre-emptive scheduling. So, I don't understand your problem. Your code can run as long as it likes. It just means that other events don't get handled in the meantime. Niels. On 2/8/07, Adam Chou <[EMAIL PROTECTED]> wrote: > i have a critical section of code where once it starts running, it MUST > finish. is there some way to stop libevent so that it doesn't interrupt the > execution of my code or do i actually have to event_del() everything then > event_add() everything back when i'm done? > > _______________________________________________ > Libevent-users mailing list > Libevent-users@monkey.org > http://monkey.org/mailman/listinfo/libevent-users > >
_______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkey.org/mailman/listinfo/libevent-users