pulse-server: use a work-queue to schedule destroy

Use the context work queue to schedule destroys from callbacks.
This is better because we can pass the destroyed object around and
implement just the action we need to do on it.
This commit is contained in:
Wim Taymans 2021-04-21 12:55:49 +02:00
parent 5041c44937
commit c70a5de526
2 changed files with 28 additions and 51 deletions

View file

@ -79,7 +79,6 @@ struct client {
const char *name;
struct spa_source *source;
struct spa_source *cleanup;
uint32_t version;
@ -220,7 +219,7 @@ struct impl {
struct spa_source *source;
struct spa_list servers;
struct spa_source *cleanup;
struct pw_work_queue *work_queue;
struct spa_list cleanup_clients;
struct pw_map samples;