diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-09-01 21:05:25 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-09-01 21:05:25 +0100 |
| commit | cefba53fe130807e96e608ad3bbb87786b654c6e (patch) | |
| tree | d3a4eb003ec3d66289c7b045cc46cf618a54d367 /src/lib/writer.cc | |
| parent | 0ec7c9d0b1f3ea58ffe17dd70bea04ad702d164b (diff) | |
Don't start thread in constructor. (Writer)
Diffstat (limited to 'src/lib/writer.cc')
| -rw-r--r-- | src/lib/writer.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 9c4a194e8..0e15edeca 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -148,12 +148,11 @@ Writer::Writer (shared_ptr<const Film> film, weak_ptr<Job> j) } job->sub (_("Encoding image data")); +} - /* Do this last; if something after this line were to throw an exception - (say if Job::sub was interrupted by cancel) this thread would never - get properly cleaned up but the Writer object would go away underneath - it. - */ +void +Writer::start () +{ _thread = new boost::thread (boost::bind (&Writer::thread, this)); } |
