summaryrefslogtreecommitdiff
path: root/src/lib/encoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-20 17:15:07 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-20 17:15:07 +0100
commit41737ca62d65bcd6c25ec1080c0c7e0e6e6ae9b2 (patch)
treec88b9fbfdf63e08d761c6e594e05279d9e45d6f2 /src/lib/encoder.cc
parent795e5d916707da498acc7079ae1fb10aa6af6973 (diff)
Fix encoder thread interruption.
When an encoder thread is interrupted we just want it silently to stop, so catch boost::thread_interrupted separately and don't pass it on. I believe the interruption of jobs and subsequent catch of boost::thread_interrupted will still work as that's the job thread rather than the encoder threads.
Diffstat (limited to 'src/lib/encoder.cc')
-rw-r--r--src/lib/encoder.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc
index 9ec817604..fbc5c3561 100644
--- a/src/lib/encoder.cc
+++ b/src/lib/encoder.cc
@@ -360,6 +360,10 @@ try
_full_condition.notify_all ();
}
}
+catch (boost::thread_interrupted& e) {
+ /* Ignore these and just stop the thread */
+ _full_condition.notify_all ();
+}
catch (...)
{
store_current ();