dispatch: add an assert()

This commit is contained in:
wm4 2018-05-05 20:19:34 +02:00
parent 95ab93d9f1
commit 88f9506f42
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);