2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

only UNLOCK and then LOCK if actually sending an event

This commit is contained in:
Bob Halley
1999-04-01 01:09:28 +00:00
parent 4a9478d4ca
commit 8bdb4ab2d1

View File

@@ -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