13
0
Commit Graph

6 Commits

Author SHA1 Message Date
Alejandro Domínguez
27c6276ff8
Replace boost::bind with std::bind 2024-11-17 20:19:43 +01:00
Alejandro Domínguez
ed1ab8622e
Replace boost::function with std::function 2024-11-06 23:08:44 +01:00
5d023b4c60 libpbd: fix an important thinko for cross-thread signal architecture
The old code assumed that the thread that created a request buffer for a given
signal-emitting thread would be the latter thread, and thus a thread-local
pointer to the request buffer could be used. This turns out not to be true: the
GUI thread tends to be responsible for constructing the request buffers for
pre-registered threads.

That mechanism has been replaced by using a RWLock protected map using
pthread_t as the key and the request buffer as the value. This allows any
thread to create and register the request buffers used between any other pair
of threads (because the lookup always uses a pthread_t).

The symptoms of this problem were a signal emitted in an audioengine thread
that was propagated to the target thread, but when the target thread scans its
request buffers for requests, it finds nothing (because it didn't know about
the request buffer). In a sense, the signal was successfully delivered to the
target thread, but no meaningful work (i.e the signal handler) is performed.
2023-04-21 12:16:37 -06:00
f112697be8
Spice up signal-test tool 2021-11-21 18:29:38 +01:00
beddcf1a01
Test cross thread invalidation-record
This also tests 2 receivers connected to the same signal
2021-11-21 04:12:27 +01:00
ba1e2d13c5
Add tool to test PBD::signal d'tor race-condition 2021-11-20 23:15:02 +01:00