Files
ardour/libs
Paul Davis 166ac63924 waveview: redesign thread exit strategy
The previous design had a race condition. When WaveViewThreads::stop_threads() was called, it would
first acquire the mutex, then set _quit, then call condition.broadcast(). But worker threads would
check _quit without holding the mutex. It was therefore for a thread to be delayed in its
own lock acquisition by the ::stop_threads() caller, then end up back in cond.wait() AFTER
the cond.broadcast() was done. Such a thread would sleep forever and never wake up.

This new design removes WaveViewDrawRequestQueue, which was a clean encapsulation of the
queueing aspects of WaveViewThreads, but unfortunately made correct mutex acquisition
and condition signalling/waiting needlessly complex. THe mutex, condition variable
and actual queue were moved into WaveViewThreads, and all worker threads execute a method
of the class which gives the appropriate code easy access to the mutex and condition var,
which must always be used together.
2021-05-10 21:41:26 -06:00
..
2020-12-01 12:08:09 +01:00
2021-05-05 17:57:16 +02:00
2021-05-05 17:57:16 +02:00
2021-05-09 17:52:29 -06:00
2021-04-18 22:02:57 +02:00
2021-01-23 23:43:14 +01:00
2021-05-05 17:57:16 +02:00
2021-05-05 17:57:16 +02:00
2020-01-22 02:00:25 +01:00
2019-09-03 05:01:59 +02:00
2021-03-01 22:14:38 +01:00