mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
Refactor the work queue
Make a separate work queue to track async operations. Keep separate work queues for links and nodes. This avoids lockups when some async operation take a long time and the work queue has SYNC_WAIT operations.
This commit is contained in:
parent
6d4db64767
commit
474981ddda
9 changed files with 344 additions and 238 deletions
|
|
@ -80,19 +80,6 @@ typedef struct {
|
|||
PinosConnection *connection;
|
||||
} PinosProtocolNativeClient;
|
||||
|
||||
static void
|
||||
sync_destroy (void *object,
|
||||
void *data,
|
||||
SpaResult res,
|
||||
uint32_t id)
|
||||
{
|
||||
PinosProtocolNativeClient *this = object;
|
||||
|
||||
pinos_connection_destroy (this->connection);
|
||||
close (this->fd);
|
||||
free (this);
|
||||
}
|
||||
|
||||
static void
|
||||
client_destroy (PinosProtocolNativeClient *this)
|
||||
{
|
||||
|
|
@ -101,11 +88,9 @@ client_destroy (PinosProtocolNativeClient *this)
|
|||
pinos_client_destroy (this->client);
|
||||
spa_list_remove (&this->link);
|
||||
|
||||
pinos_main_loop_defer (this->impl->core->main_loop,
|
||||
this,
|
||||
SPA_RESULT_WAIT_SYNC,
|
||||
sync_destroy,
|
||||
this);
|
||||
pinos_connection_destroy (this->connection);
|
||||
close (this->fd);
|
||||
free (this);
|
||||
}
|
||||
|
||||
static SpaResult
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue