fix ThreadSanitizer data race warning

This commit is contained in:
Brad Parker 2016-12-29 23:16:00 -05:00
parent 583511c045
commit 94309b3acd

View File

@ -608,7 +608,6 @@ bool task_queue_ctl(enum task_queue_ctl_state state, void *data)
SLOCK_LOCK(queue_lock);
running = tasks_running.front;
SLOCK_UNLOCK(queue_lock);
for (; running; running = running->next)
{
@ -619,6 +618,8 @@ bool task_queue_ctl(enum task_queue_ctl_state state, void *data)
}
}
SLOCK_UNLOCK(queue_lock);
/* skip this task, user must try again later */
if (found)
break;