[beast] BSE: slave: recheck thread alive condition before entering conditions waits
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast] BSE: slave: recheck thread alive condition before entering conditions waits
- Date: Sun, 5 Feb 2017 17:42:08 +0000 (UTC)
commit d1f7e50fa792c2f7310618b51e2d06d0a6625d9b
Author: Tim Janik <timj gnu org>
Date: Sun Feb 5 18:10:22 2017 +0100
BSE: slave: recheck thread alive condition before entering conditions waits
This fixes beast/bsetool sometimes hanging upon program exit.
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 768983b..d77eb7f 100644
--- a/bse/bseenginemaster.cc
+++ b/bse/bseenginemaster.cc
@@ -944,6 +944,8 @@ engine_run_slave ()
{
thread_process_nodes (bse_engine_block_size(), NULL); // FIXME: merge profile data
std::unique_lock<std::mutex> slave_lock (slave_mutex);
+ if (!slaves_running)
+ break;
slave_condition.wait (slave_lock);
}
Bse::TaskRegistry::remove (Rapicorn::ThisThread::thread_pid());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]