mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
We are not allowed to call free_link from the data thread because it does free() and some pw_mem calls which should only be called from the main thread. To solve this, pause the core, queue a free_link operation on the data thread, which will be scheduled after the previous remove_link operation completes, free the link and then resume the core. Blocking and resuming the core is necessary because we can't block for completion of the invoke calls (the jack method is not allowed to block) and we must ensure that nothing can happen with the memory (like reuse the mem_id) before we have cleaned it up. Fixes a crash in jack with create/destroy link stress. |
||
|---|---|---|
| .. | ||
| examples | ||
| jack | ||
| src | ||
| meson.build | ||