[beast] BSE: slave: ensure proper locking around changes to thread alive condition



commit 1f12b548a942902dbc87d755abbc7bc79b10f20c
Author: Tim Janik <timj gnu org>
Date:   Sun Feb 5 19:54:12 2017 +0100

    BSE: slave: ensure proper locking around changes to thread alive condition
    
    Signed-off-by: Tim Janik <timj gnu org>

 bse/bseenginemaster.cc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/bse/bseenginemaster.cc b/bse/bseenginemaster.cc
index d77eb7f..666476e 100644
--- a/bse/bseenginemaster.cc
+++ b/bse/bseenginemaster.cc
@@ -918,7 +918,9 @@ void
 engine_stop_slaves ()
 {
   assert_return (slaves_running == true);
+  slave_mutex.lock();
   slaves_running = false;
+  slave_mutex.unlock();
   while (!slave_threads.empty())
     {
       engine_wakeup_slaves();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]