diff options
Diffstat (limited to 'misc/dispatch.c')
-rw-r--r-- | misc/dispatch.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/misc/dispatch.c b/misc/dispatch.c index 40729d9e8d..086896ba79 100644 --- a/misc/dispatch.c +++ b/misc/dispatch.c @@ -122,6 +122,10 @@ static void mp_dispatch_append(struct mp_dispatch_queue *queue, // Wake up the main thread; note that other threads might wait on this // condition for reasons, so broadcast the condition. pthread_cond_broadcast(&queue->cond); + // No wakeup callback -> assume mp_dispatch_queue_process() needs to be + // interrupted instead. + if (!queue->wakeup_fn) + queue->interrupted = true; pthread_mutex_unlock(&queue->lock); if (queue->wakeup_fn) queue->wakeup_fn(queue->wakeup_ctx); |