On Apr 10, 2012, at 6:33 PM, Nick Mathewson wrote: Instead you can simply say:
ev = event_new(base, -1, 0, process_work_queue_cb, NULL); event_active(ev, EV_TIMEOUT, 1);
The second approach is better because it doesn't require you to put the event in the timeout heap at all: instead, Libevent sees that you're activating the event, and puts it right in the queue of active events.
Can you call event_activate from another thread as a way to wakeup the event loop from another thread? |