client API: clarify asynchronous call ordering non-guarantees

Both asynchronous and synchronous calls used to be put into the core's
dispatch queue. Also, asynchronous calls were actually synchronous, just
without forcing a wait on the client's thread. This meant that both
kinds of calls were always strictly ordered.

A longer time ago, synchronous calls were changed to simply lock the
core. This could possibly lead to reordering. Recently, some commands
were changed to run on worker threads, which made the order even looser.

Also remove another now incorrect doxygen comment regarding async
commands.
This commit is contained in:
wm4 2018-05-10 12:41:01 +02:00
parent 95c4f0f769
commit 005d3bc81a
1 changed files with 3 additions and 6 deletions

View File

@ -107,8 +107,9 @@ extern "C" {
* careful not accidentally interpret the mpv_event->reply_userdata if an
* event is not a reply. (For non-replies, this field is set to 0.)
*
* Currently, asynchronous calls are always strictly ordered (even with
* synchronous calls) for each client, although that may change in the future.
* Asynchronous calls may be reordered in arbitrarily with other synchronous
* and asynchronous calls. If you want a guaranteed order, you need to wait
* until asynchronous calls report completion before doing the next call.
*
* Multithreading
* --------------
@ -969,10 +970,6 @@ int mpv_command_string(mpv_handle *ctx, const char *args);
* MPV_EVENT_COMMAND_REPLY event. (This event will also have an
* error code set if running the command failed.)
*
* This has nothing to do with the "async" command prefix, although they might
* be unified in the future. For now, calling this API means that the command
* will be synchronously executed on the core, without blocking the API user.
*
* * Safe to be called from mpv render API threads.
*
* @param reply_userdata the value mpv_event.reply_userdata of the reply will