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:
Wim Taymans 2017-01-12 16:48:17 +01:00
parent 6d4db64767
commit 474981ddda
9 changed files with 344 additions and 238 deletions

View file

@ -258,10 +258,6 @@ do_remove_link_done (SpaLoop *loop,
port->n_buffers = 0;
}
pinos_main_loop_defer_complete (node->core->main_loop,
port,
seq,
SPA_RESULT_OK);
return SPA_RESULT_OK;
}
@ -326,7 +322,6 @@ do_clear_buffers_done (SpaLoop *loop,
void *user_data)
{
PinosPort *port = user_data;
PinosNode *node = port->node;
SpaResult res;
pinos_log_debug ("port %p: clear buffers finish", port);
@ -338,10 +333,6 @@ do_clear_buffers_done (SpaLoop *loop,
port->buffers = NULL;
port->n_buffers = 0;
pinos_main_loop_defer_complete (node->core->main_loop,
port,
seq,
res);
return res;
}