projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Tidy up thread in destructor (Job)
[dcpomatic.git]
/
src
/
lib
/
job.cc
diff --git
a/src/lib/job.cc
b/src/lib/job.cc
index 87e4fb3d370c783a99802eaf8dcc09e5e3a2af1c..784defc91736074e53292fdbcdb4c306341d7d6f 100644
(file)
--- 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 ()