summaryrefslogtreecommitdiff
path: root/lib/tevent/tevent_queue.c
AgeCommit message (Collapse)AuthorFilesLines
2014-04-01tevent: fix crash bug in tevent_queue_immediate_trigger()Stefan Metzmacher1-0/+4
Assume we we have a queue with 2 entries (A and B with triggerA() and triggerB()). If triggerA() removes itself tevent_queue_entry_destructor() will be called for A, this schedules the immediate event to call triggerB(). If triggerA() then also removes B by an explicit of implizit talloc_free(), q->list is NULL, but the immediate event is still scheduled and can't be unscheduled. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 7fe5584e2a59584431cb2ddf8a4da22bfb924454)
2011-08-09tevent: add tevent_queue_add_entry() and tevent_queue_add_optimize_empty()Stefan Metzmacher1-2/+55
This adds more flexible handling for the add operation: - It allows the caller to remove a tevent_req from the queue by calling talloc_free() on the returned tevent_queue_entry. - It allows the caller to optimize for the empty queue case, where it the caller wants to avoid the delay caused by the immediate event. metze
2011-08-09tevent: splitout tevent_queue_add_internal() from tevent_queue_add()Stefan Metzmacher1-8/+26
metze
2011-08-09tevent: allow tevent_queue_add() to take a NULL trigger functionStefan Metzmacher1-0/+7
This way the caller can add a blocker to the queue. metze
2011-08-09tevent: add tevent_queue_running() functionStefan Metzmacher1-0/+5
metze
2009-03-17tevent: use an immediate event as trigger for tevent_queueStefan Metzmacher1-40/+59
metze
2009-02-26tevent: add tevent_queue infrastructureStefan Metzmacher1-0/+198
metze