From 67311af05f61e78576e1ae67892b7d590aa1e996 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 24 Feb 2020 00:16:10 +0100 Subject: ipc: add more blabla that nobody reads --- DOCS/man/ipc.rst | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'DOCS/man') diff --git a/DOCS/man/ipc.rst b/DOCS/man/ipc.rst index 6d0f9c0d9c..40e0730089 100644 --- a/DOCS/man/ipc.rst +++ b/DOCS/man/ipc.rst @@ -147,6 +147,29 @@ with ``#`` and empty lines are ignored. Currently, embedded 0 bytes terminate the current line, but you should not rely on this. +Data flow +--------- + +Currently, the mpv-side IPC implementation does not service the socket while a +command is executed and the reply is written. It is for example not possible +that other events, that happened during the execution of the command, are +written to the socket before the reply is written. + +This might change in the future. The only guarantee is that replies to IPC +messages are sent in sequence. + +Also, since socket I/O is inherently asynchronous, it is possible that you read +unrelated event messages from the socket, before you read the reply to the +previous command you sent. In this case, these events were queued by the mpv +side before it read and started processing your command message. + +If the mpv-side IPC implementation switches away from blocking writes and +blocking command execution, it may attempt to send events at any time. + +You can also use asynchronous commands, which can return in any order, and +which do not block IPC protocol interaction at all while the command is +executed in the background. + Asynchronous commands --------------------- -- cgit v1.2.3