mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
fix condition-variable race caused by not holding the request lock when signalling the var
This commit is contained in:
parent
21f4598395
commit
c15e6fd7db
1 changed files with 3 additions and 0 deletions
|
|
@ -225,6 +225,8 @@ Butler::thread_work ()
|
||||||
so do not bother with buffer refills at this
|
so do not bother with buffer refills at this
|
||||||
time.
|
time.
|
||||||
*/
|
*/
|
||||||
|
std::cerr << "new locate detected in restart, lock and signal\n";
|
||||||
|
Glib::Threads::Mutex::Lock lm (request_lock);
|
||||||
DEBUG_TRACE (DEBUG::Butler, string_compose ("\tlocate pending, so just pause @ %1 till woken again\n", g_get_monotonic_time()));
|
DEBUG_TRACE (DEBUG::Butler, string_compose ("\tlocate pending, so just pause @ %1 till woken again\n", g_get_monotonic_time()));
|
||||||
paused.signal ();
|
paused.signal ();
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -474,6 +476,7 @@ Butler::wait_until_finished ()
|
||||||
DEBUG_TRACE (DEBUG::Butler, string_compose ("%1: waiting for butler to finish @ %2\n", DEBUG_THREAD_SELF, g_get_monotonic_time()));
|
DEBUG_TRACE (DEBUG::Butler, string_compose ("%1: waiting for butler to finish @ %2\n", DEBUG_THREAD_SELF, g_get_monotonic_time()));
|
||||||
queue_request (Request::Pause);
|
queue_request (Request::Pause);
|
||||||
paused.wait(request_lock);
|
paused.wait(request_lock);
|
||||||
|
std::cerr << "wait till finished is back\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue