From ab614280b7979ee5e0a292410062a42285235bab Mon Sep 17 00:00:00 2001 From: Stephane Dorre Date: Wed, 21 Jul 2021 09:13:57 +0200 Subject: [PATCH] Fix Consumer dispatch queue handler - When the queue is full (more messages than threads) the queue full flag was set to True but never reset. Which lead to a blocking state were messages are not read anymore. --- sources/core/consumer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/core/consumer.cpp b/sources/core/consumer.cpp index 11189384..ecd40abb 100644 --- a/sources/core/consumer.cpp +++ b/sources/core/consumer.cpp @@ -58,8 +58,10 @@ void consumer::dispatch_changed_handler(size_t size) { if (size >= m_max_concurrency) { dispatch_queue_full.store(true); - dispatch_queue_changed.notify_all(); + } else { + dispatch_queue_full.store(false); } + dispatch_queue_changed.notify_all(); } void