[][src]Function libmpv_sys::mpv_wakeup

pub unsafe extern "C" fn mpv_wakeup(ctx: *mut mpv_handle)

Interrupt the current mpv_wait_event() call. This will wake up the thread currently waiting in mpv_wait_event(). If no thread is waiting, the next mpv_wait_event() call will return immediately (this is to avoid lost wakeups).

mpv_wait_event() will receive a MPV_EVENT_NONE if it's woken up due to this call. But note that this dummy event might be skipped if there are already other events queued. All what counts is that the waiting thread is woken up at all.

Safe to be called from mpv render API threads.