From 82fef2120c35c4ecaa13cab1f45f0bd0b041eecd Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 30 Nov 2015 11:50:40 +0000 Subject: I think it's ok and less crash-prone to check joinable() rather than asserting it; I have seen traces which suggest the assert might be triggering. In an ideal world we would track down why that's happening. --- src/lib/writer.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 17bd21daf..7381d2a90 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -429,8 +429,10 @@ Writer::terminate_thread (bool can_throw) _full_condition.notify_all (); lock.unlock (); - DCPOMATIC_ASSERT (_thread->joinable ()); - _thread->join (); + if (_thread->joinable ()) { + _thread->join (); + } + if (can_throw) { rethrow (); } -- cgit v1.2.3