diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-06-26 11:04:02 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-06-26 11:04:02 +0100 |
| commit | 02f028d271677b3b3669b5cdfda1597108a34b80 (patch) | |
| tree | 76618364e855af0e31bc88c44f8357da62d8c5f5 /src/lib/encoder.h | |
| parent | ee8f7f7edb1da818f60dfd2da11ca458aad0dc35 (diff) | |
Use full/empty conditions rather than just a single condition for the server and encoder.
Diffstat (limited to 'src/lib/encoder.h')
| -rw-r--r-- | src/lib/encoder.h | 5 |
1 files changed, 4 insertions, 1 deletions
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<boost::shared_ptr<DCPVideoFrame> > _queue; std::list<boost::thread *> _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> _writer; Waker _waker; |
