From 50177aaa3b2040cc76d59b2e19687d9016641c39 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 5 Mar 2020 21:05:14 +0100 Subject: dispatch: add strange mechanism for making worker threads responsive This is probably a sin for the sake of user experience. See a following commit that wires up f_decoder_wrapper with it. --- misc/dispatch.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'misc/dispatch.h') diff --git a/misc/dispatch.h b/misc/dispatch.h index 3367018390..fbf826037b 100644 --- a/misc/dispatch.h +++ b/misc/dispatch.h @@ -10,6 +10,9 @@ struct mp_dispatch_queue *mp_dispatch_create(void *talloc_parent); void mp_dispatch_set_wakeup_fn(struct mp_dispatch_queue *queue, void (*wakeup_fn)(void *wakeup_ctx), void *wakeup_ctx); +void mp_dispatch_set_onlock_fn(struct mp_dispatch_queue *queue, + void (*onlock_fn)(void *onlock_ctx), + void *onlock_ctx); void mp_dispatch_enqueue(struct mp_dispatch_queue *queue, mp_dispatch_fn fn, void *fn_data); void mp_dispatch_enqueue_autofree(struct mp_dispatch_queue *queue, -- cgit v1.2.3