summaryrefslogtreecommitdiff
path: root/src/lib/writer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-06 23:31:35 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-06 23:31:35 +0100
commit576b7e8eee6c17a5a7f0f4c3bfb1787768f4f276 (patch)
tree31a89131535c720f3f4e0d189f127cfc72afd4fe /src/lib/writer.cc
parent77c1e8d12586abf444a7b3b71bb88c0df8704999 (diff)
Missing wakeups of the writer thread when we are waiting for it do something.v2.13.34
Diffstat (limited to 'src/lib/writer.cc')
-rw-r--r--src/lib/writer.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 96fb9e179..cd5b6d7e0 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -130,7 +130,9 @@ Writer::write (Data encoded, Frame frame, Eyes eyes)
boost::mutex::scoped_lock lock (_state_mutex);
while (_queued_full_in_memory > _maximum_frames_in_memory) {
- /* There are too many full frames in memory; wait until that is sorted out */
+ /* There are too many full frames in memory; wake the main writer thread and
+ wait until it sorts everything out */
+ _empty_condition.notify_all ();
_full_condition.wait (lock);
}
@@ -175,8 +177,9 @@ Writer::repeat (Frame frame, Eyes eyes)
while (_queue.size() > _maximum_queue_size && have_sequenced_image_at_queue_head()) {
/* The queue is too big, and the main writer thread can run and fix it, so
- wait until it has done.
+ wake it and wait until it has done.
*/
+ _empty_condition.notify_all ();
_full_condition.wait (lock);
}
@@ -205,8 +208,9 @@ Writer::fake_write (Frame frame, Eyes eyes)
while (_queue.size() > _maximum_queue_size && have_sequenced_image_at_queue_head()) {
/* The queue is too big, and the main writer thread can run and fix it, so
- wait until it has done.
+ wake it and wait until it has done.
*/
+ _empty_condition.notify_all ();
_full_condition.wait (lock);
}