13
0
livetrax/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
..
boost-debug
msvc
MSVCpbd
pbd Fix BaseUI x-thread signal vs thread-start race 2022-03-02 21:19:12 +01:00
test
base_ui.cc Fix BaseUI x-thread signal vs thread-start race 2022-03-02 21:19:12 +01:00
basename.cc
boost_debug.cc
cartesian.cc
ChangeLog
cocoa_open_uri.mm
command.cc
configuration_variable.cc
controllable.cc
convert.cc
COPYING
cpus.cc
crossthread.cc
crossthread.posix.cc
crossthread.win.cc
debug_rt_alloc.c
debug.cc
demangle.cc
enums.cc
enumwriter.cc
epa.cc
error.cc
event_loop.cc
ffs.cc
file_archive.cc
file_utils.cc
fpu.cc
gettext.h
id.cc
libpbd.pc.in
libpbd.spec.in
locale_guard.cc
localtime_r.cc
malign.cc
md5.cc
microseconds.cc
mountpoint.cc
openuri.cc Fix vfork edge-case 2021-12-31 01:39:39 +01:00
pathexpand.cc
pbd.cc
pcg_rand.cc Amend 55211b8d (PRNG seed, use local address) 2021-08-16 04:59:10 +02:00
pool.cc
property_list.cc
pthread_utils.cc Implement a replacement for Glib::Threads::Thread 2022-03-01 01:33:08 +01:00
reallocpool.cc
receiver.cc
resource.cc
run-tests.sh
search_path.cc
semutils.cc
shortpath.cc
signals.cc
spinlock.cc
stacktrace.cc Log Thread-name in stacktrace 2022-01-26 00:17:49 +01:00
stateful_diff_command.cc
stateful.cc Change name of Stateful::apply_changes (PropertyBase) to the singular form. 2021-09-25 16:49:51 -06:00
string_convert.cc
strreplace.cc Fix poor_mans_glob, ~' for $HOME' is only valid at the start of a path 2022-02-01 15:47:54 +01:00
strsplit.cc
system_exec.cc
textreceiver.cc
timer.cc
timing.cc
tlsf.cc
transmitter.cc
undo.cc
uuid.cc
whitespace.cc
windows_mmcss.cc
windows_special_dirs.cc Fix minor memory leak when querying Windows registry 2021-10-11 18:20:07 +02:00
windows_timer_utils.cc
wscript wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
xml++.cc API to directly retrieve XML child content 2022-01-13 00:09:55 +01:00