diff options
author | wm4 <wm4@nowhere> | 2020-03-05 21:05:14 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2020-03-05 22:00:50 +0100 |
commit | 50177aaa3b2040cc76d59b2e19687d9016641c39 (patch) | |
tree | 24c35a06ce2456cd0200e3c9c343280e6d8fff38 /misc/dispatch.h | |
parent | c1ff54e2e4ec3e93f20afac99f085fd632cbcc4e (diff) | |
download | mpv-50177aaa3b2040cc76d59b2e19687d9016641c39.tar.bz2 mpv-50177aaa3b2040cc76d59b2e19687d9016641c39.tar.xz |
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.
Diffstat (limited to 'misc/dispatch.h')
-rw-r--r-- | misc/dispatch.h | 3 |
1 files changed, 3 insertions, 0 deletions
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, |