mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
loop: improve in_thread handling of invoke queue
Because we now have a dedicated queue per thread, we can simply add our invoke item to the queue and then flush all the queues when we are running in the thread of the loop. This simplifies some things and removes potential out-of-order messages that got queued while flushing.
This commit is contained in:
parent
de0db48f17
commit
8ff40e6252
2 changed files with 28 additions and 43 deletions
|
|
@ -94,8 +94,7 @@ struct spa_loop_methods {
|
|||
struct spa_source *source);
|
||||
|
||||
/** Invoke a function in the context of this loop.
|
||||
* May be called from the loop's thread, but otherwise
|
||||
* can only be called by a single thread at a time.
|
||||
* May be called from any thread and multiple threads at the same time.
|
||||
* If called from the loop's thread, all callbacks previously queued with
|
||||
* invoke() will be run synchronously, which might cause unexpected
|
||||
* reentrancy problems.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue