From 02f028d271677b3b3669b5cdfda1597108a34b80 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 26 Jun 2014 11:04:02 +0100 Subject: Use full/empty conditions rather than just a single condition for the server and encoder. --- src/lib/encoder.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib/encoder.h') diff --git a/src/lib/encoder.h b/src/lib/encoder.h index a8ee220aa..8d5aa2c40 100644 --- a/src/lib/encoder.h +++ b/src/lib/encoder.h @@ -111,7 +111,10 @@ private: std::list > _queue; std::list _threads; mutable boost::mutex _mutex; - boost::condition _condition; + /** condition to manage thread wakeups when we have nothing to do */ + boost::condition _empty_condition; + /** condition to manage thread wakeups when we have too much to do */ + boost::condition _full_condition; boost::shared_ptr _writer; Waker _waker; -- cgit v1.2.3