dispatch: add an assert()

This commit is contained in:
wm4 2018-05-05 20:19:34 +02:00 committed by sfan5
parent fae9d7744c
commit 58479906d8
1 changed files with 1 additions and 0 deletions

View File

@ -274,6 +274,7 @@ void mp_dispatch_queue_process(struct mp_dispatch_queue *queue, double timeout)
// while the dispatch item is processed.
// At the same time, we must prevent other threads from returning
// from mp_dispatch_lock(), which is done by locked=true.
assert(!queue->locked);
queue->locked = true;
pthread_mutex_unlock(&queue->lock);