Files
ardour/libs/pbd
Robin Gareus 84c51a1411 Fix BaseUI x-thread signal vs thread-start race
Control surfaces c'tor usually subscribe to signals e.g.
PortConnectedOrDisconnected. This happens after the parent BaseUI
is created, but before set_active() -> BaseUI::run() is called.

At this point in time there is no run_loop thread.

There are two options to handle AbstractUI::call_slot():

 A. Queue the event in the event-loop, using the thread-local
    request buffer of the caller. Then hope the BaseUI
    thread is started, and calls ::handle_ui_requests() before
    the memory pool runs out of space.

 B. Handle the event in the calling thread. -- This may not be
    rt-safe and may call functions with locks held by the caller.
    It will however not accumulate events.

This takes approach (B). If _run_loop_thread is NULL, directly
handle the signal.

In the past, prior to 50abcc74b5, approach (A) was taken.
NULL never matched Glib::Threads::Thread::self().

This also reverts a prior attempt (e417495505) to address this issue.
2022-03-02 21:19:12 +01:00
..
2020-11-07 10:37:52 +01:00
2020-10-13 21:27:16 +02:00
2020-03-18 18:16:29 +01:00
2020-10-13 21:27:16 +02:00
2021-05-05 17:57:16 +02:00
2021-06-30 17:15:27 +02:00
2015-10-05 16:17:49 +02:00
2021-12-31 01:39:39 +01:00
2021-06-26 18:47:08 -06:00
2021-03-21 22:31:40 +01:00
2020-12-02 21:34:52 +01:00
2022-01-26 00:17:49 +01:00
2020-10-13 21:27:16 +02:00
2020-02-07 11:27:22 +00:00
2020-10-13 21:27:16 +02:00
2021-06-26 18:40:44 -06:00