{
boost::mutex::scoped_lock lock (_state_mutex);
+ if (_zombie) {
+ return;
+ }
+
while (_queued_full_in_memory > _maximum_frames_in_memory) {
/* There are too many full frames in memory; wake the main writer thread and
wait until it sorts everything out */
while (true)
{
boost::mutex::scoped_lock lock (_state_mutex);
+ if (_zombie) {
+ return;
+ }
while (true) {
}
_hanging_texts = new_hanging_texts;
}
+
+
+/** Set the writer so that it has no queue and drops any pending or future requests to write images */
+void
+Writer::zombify()
+{
+ boost::mutex::scoped_lock lock(_state_mutex);
+
+ _queue.clear();
+ _queued_full_in_memory = 0;
+ _zombie = true;
+ _full_condition.notify_all();
+}
+