summaryrefslogtreecommitdiff
path: root/src/lib/job.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/job.cc')
-rw-r--r--src/lib/job.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc
index c228defc5..7aaac748c 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -59,6 +59,7 @@ Job::~Job ()
{
if (_thread) {
_thread->interrupt ();
+ DCPOMATIC_ASSERT (_thread->joinable ());
_thread->join ();
}
@@ -416,7 +417,10 @@ Job::cancel ()
}
_thread->interrupt ();
+ DCPOMATIC_ASSERT (_thread->joinable ());
_thread->join ();
+ delete _thread;
+ _thread = 0;
}
void
@@ -447,4 +451,3 @@ Job::when_finished (boost::signals2::connection& connection, function<void()> fi
connection = Finished.connect (finished);
}
}
-