Check that we're not about to deadlock if the queue is full and we can't repeat-write.
authorCarl Hetherington <cth@carlh.net>
Thu, 7 Jun 2018 15:34:44 +0000 (16:34 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 7 Jun 2018 15:34:44 +0000 (16:34 +0100)
src/lib/writer.cc

index 39d6f61188aa23f3610c77acf0fe4a73452cea1a..b135f4321c2729a4d1c5ea761e0f219a19bbf331 100644 (file)
@@ -342,6 +342,8 @@ try
                                break;
                        }
 
+                       DCPOMATIC_ASSERT (_queue.size() < _maximum_queue_size);
+
                        /* Nothing to do: wait until something happens which may indicate that we do */
                        LOG_TIMING (N_("writer-sleep queue=%1"), _queue.size());
                        _empty_condition.wait (lock);