From 0f99e00822866416e29d136db06f9f2863c1088c Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期一, 29 三月 2021 14:39:03 +0800
Subject: [PATCH] update

---
 src/queue/lock_free_queue.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/queue/lock_free_queue.h b/src/queue/lock_free_queue.h
index 54d0b04..f74f4bc 100644
--- a/src/queue/lock_free_queue.h
+++ b/src/queue/lock_free_queue.h
@@ -102,6 +102,7 @@
   ~LockFreeQueue();
 
   inline void  close();
+  inline bool isClosed();
 
   // std::atomic_uint reference;
   /// @brief constructor of the class
@@ -197,6 +198,14 @@
   closeTime = time(NULL); 
 }
 
+template<
+  typename ELEM_T,
+  typename Allocator,
+  template<typename T, typename AT> class Q_TYPE>
+inline bool LockFreeQueue<ELEM_T, Allocator, Q_TYPE>::isClosed() {
+  return status == LOCK_FREE_Q_ST_CLOSED;
+}
+
 
 template<
   typename ELEM_T,

--
Gitblit v1.8.0