From 690bd933d52c7dbbcddde7c0aff30f7fee91a6d9 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 13 Nov 2018 13:52:45 -0800 Subject: Support shutdown with postLimit in BlockingQueue --- osdep/BlockingQueue.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'osdep') diff --git a/osdep/BlockingQueue.hpp b/osdep/BlockingQueue.hpp index 6f81ddf2..9e2f73cb 100644 --- a/osdep/BlockingQueue.hpp +++ b/osdep/BlockingQueue.hpp @@ -63,6 +63,8 @@ public: c.notify_one(); break; } + if (!r) + break; gc.wait(lock); } } @@ -72,6 +74,7 @@ public: std::lock_guard lock(m); r = false; c.notify_all(); + gc.notify_all(); } inline bool get(T &value) -- cgit v1.2.3