Skip to content

Undeprecate mp.get_wakeup_pipe() #14933

@ruihe774

Description

@ruihe774

Expected behavior of the wanted feature

I propose to revert the deprecation of the Lua API mp.get_wakeup_pipe() and its underlying C API mpv_get_wakeup_pipe(). mp.get_wakeup_pipe() is the only method to implement a custom event loop in the Lua script. It is useful when a scripter wants to wait for multiple event sources. (In contrast, mp.wait_event() can only listen to events from mpv, not external event sources.)

The deprecation message of mpv_get_wakeup_pipe() suggests to use mpv_set_wakeup_callback(); however, it is not possible to implement a similar alternative for Lua. The callback set by mpv_set_wakeup_callback() can be called in arbitrary threads, and can be called when Lua runtime is concurrently running, which breaks the single-thread assumption of Lua runtime.

Alternative behavior of the wanted feature

No response

Log File

No response

Sample Files

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions