summaryrefslogtreecommitdiff
path: root/osdep
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2018-11-13 13:52:45 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2018-11-13 13:52:45 -0800
commit690bd933d52c7dbbcddde7c0aff30f7fee91a6d9 (patch)
tree5b9eadf3c8459c3afb9a658d3ca9071b52f1f0db /osdep
parent6684559cd9b8a96da29c7a59c8d787918a4171f9 (diff)
downloadinfinitytier-690bd933d52c7dbbcddde7c0aff30f7fee91a6d9.tar.gz
infinitytier-690bd933d52c7dbbcddde7c0aff30f7fee91a6d9.zip
Support shutdown with postLimit in BlockingQueue
Diffstat (limited to 'osdep')
-rw-r--r--osdep/BlockingQueue.hpp3
1 files changed, 3 insertions, 0 deletions
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<std::mutex> lock(m);
r = false;
c.notify_all();
+ gc.notify_all();
}
inline bool get(T &value)