thread: deprecate pw_thread_utils_set()

Setting a global thread-utils is not a good idea, especially
when multiple contexts will register their own interface.

Instead, set the thread-utils as a context object and use this to
configure the data loop in the context.

In JACK we need a per context implementation of the interface so that
we can find the context specific thread-utils.

See #2252
This commit is contained in:
Wim Taymans 2022-03-30 20:31:42 +02:00
parent f3466f8cd6
commit f0424c0b99
6 changed files with 59 additions and 33 deletions

View file

@ -455,6 +455,7 @@ struct pw_context {
struct spa_hook_list driver_listener_list;
struct spa_hook_list listener_list;
struct spa_thread_utils *thread_utils;
struct pw_loop *main_loop; /**< main loop for control */
struct pw_loop *data_loop; /**< data loop for data passing */
struct pw_data_loop *data_loop_impl;