[Libevent-users] How to schedule a plain event

2009-07-13 Thread q6Yr7e0o nIJDVMjC
Hi, how is it possible to schedule a callback in the next eventloop iteration? Of course i could add a timer event with timeout 0 but this seems like a lot of overhead. I just want a function to be called in the next event iteration (i can't call it directly in another libevent callback because

Re: [Libevent-users] How to schedule a plain event

2009-07-13 Thread Nick Mathewson
On Mon, Jul 13, 2009 at 02:29:21PM +0200, q6Yr7e0o nIJDVMjC wrote: Hi, how is it possible to schedule a callback in the next eventloop iteration? Of course i could add a timer event with timeout 0 but this seems like a lot of overhead. I just want a function to be called in the next event

Re: [Libevent-users] How to schedule a plain event

2009-07-13 Thread q6Yr7e0o nIJDVMjC
Hi The easiest thing to do here is to use the event_active() call to make the event active now.  But it doesn't do quite what you asked for: the callback will be run later in the current iteration of the loop, not in the next iteration.  If it  needs to be in the next iteration, I can't