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.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc
index 87e4fb3d3..784defc91 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -53,6 +53,16 @@ Job::Job (shared_ptr<const Film> film)
}
+Job::~Job ()
+{
+ if (_thread) {
+ _thread->interrupt ();
+ _thread->join ();
+ }
+
+ delete _thread;
+}
+
/** Start the job in a separate thread, returning immediately */
void
Job::start ()