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 |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/queue/lock_free_queue.h b/src/queue/lock_free_queue.h
index d66ee8c..f74f4bc 100644
--- a/src/queue/lock_free_queue.h
+++ b/src/queue/lock_free_queue.h
@@ -6,7 +6,7 @@
 
 #include <usg_common.h>
 #include <assert.h> // assert()
-#include "mem_pool.h"
+#include "shm_mm.h"
 #include "sem_util.h"
 #include "logger_factory.h"
 #include "shm_allocator.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