Speculative fix for hangs during Encoder::end().
authorCarl Hetherington <cth@carlh.net>
Fri, 2 Oct 2015 09:06:48 +0000 (10:06 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 2 Oct 2015 09:06:48 +0000 (10:06 +0100)
commitaac97a7653003ab7032d927eeb236cff4ad726d1
treea0e0cdf8da922868ad032c94e00eb0839c034638
parenteafc31e4f513a8ec11bd806e5bf36f21d32689a0
Speculative fix for hangs during Encoder::end().

I think it's possible that, if an exception is thrown by
an Encoder thread during the clear-out loop at the
top of Encoder::end, that loop will hang waiting for
a notify() on _full_condition that never comes.

Fix this by rethrow()ing in this loop and notifying
_full_condition if an encoder thread throws an exception.
src/lib/encoder.cc