diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-09-01 21:04:15 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-09-01 21:04:15 +0100 |
| commit | 0ec7c9d0b1f3ea58ffe17dd70bea04ad702d164b (patch) | |
| tree | db47f2de3c3248e6c811a450bb202bb0d950df0b /src/lib/job.cc | |
| parent | 1934870acbab5efe51afecff46081a5850876eee (diff) | |
Tidy up thread in destructor (Job)
Diffstat (limited to 'src/lib/job.cc')
| -rw-r--r-- | src/lib/job.cc | 10 |
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 () |
