mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pipewire: data-loop: set thread name
Set the name of the thread running the data loop to "pw-data-loop" for easier identification in debuggers, htop, etc.
This commit is contained in:
parent
0c1ee5f01d
commit
32ee81d977
1 changed files with 6 additions and 1 deletions
|
|
@ -188,7 +188,12 @@ int pw_data_loop_start(struct pw_data_loop *loop)
|
|||
|
||||
if ((utils = loop->thread_utils) == NULL)
|
||||
utils = pw_thread_utils_get();
|
||||
thr = spa_thread_utils_create(utils, NULL, do_loop, loop);
|
||||
|
||||
static const struct spa_dict_item items[] = {
|
||||
{ SPA_KEY_THREAD_NAME, "pw-data-loop" },
|
||||
};
|
||||
|
||||
thr = spa_thread_utils_create(utils, &SPA_DICT_INIT_ARRAY(items), do_loop, loop);
|
||||
loop->thread = (pthread_t)thr;
|
||||
if (thr == NULL) {
|
||||
pw_log_error("%p: can't create thread: %m", loop);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue