mirror of
https://github.com/isc-projects/bind9.git
synced 2026-07-16 22:45:36 -04:00
only UNLOCK and then LOCK if actually sending an event
This commit is contained in:
parent
4a9478d4ca
commit
8bdb4ab2d1
1 changed files with 4 additions and 3 deletions
|
|
@ -621,17 +621,18 @@ run(void *uap) {
|
|||
INSIST(!EMPTY(task->events));
|
||||
event = HEAD(task->events);
|
||||
DEQUEUE(task->events, event, link);
|
||||
UNLOCK(&task->lock);
|
||||
|
||||
/*
|
||||
* Execute the event action.
|
||||
*/
|
||||
XTRACE("execute action");
|
||||
if (event->action != NULL)
|
||||
if (event->action != NULL) {
|
||||
UNLOCK(&task->lock);
|
||||
(event->action)(task, event);
|
||||
LOCK(&task->lock);
|
||||
}
|
||||
dispatch_count++;
|
||||
|
||||
LOCK(&task->lock);
|
||||
if (EMPTY(task->events)) {
|
||||
/*
|
||||
* Nothing else to do for this task
|
||||
|
|
|
|||
Loading…
Reference in a new issue