From 458d0f0511acdf181671f13c2b6967d9d95b9316 Mon Sep 17 00:00:00 2001 From: shenxin <shenxin@basic.com> Date: 星期六, 21 八月 2021 21:54:57 +0800 Subject: [PATCH] add lichao's interface --- src/queue/shm_queue.h | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/src/queue/shm_queue.h b/src/queue/shm_queue.h index 0921af3..74b9b33 100644 --- a/src/queue/shm_queue.h +++ b/src/queue/shm_queue.h @@ -87,19 +87,15 @@ template <typename ELEM_T> bool SHMQueue<ELEM_T>::bind(int key, bool force) { - - hashtable_lock(hashtable); void *tmp_ptr = hashtable_get(hashtable, key); if (tmp_ptr == NULL || tmp_ptr == (void *)1 || force) { queue = new LockFreeQueue<ELEM_T, SHM_Allocator>(mqsize); hashtable_put(hashtable, key, (void *)queue); mkey = key; owner = true; - hashtable_unlock(hashtable); return true; } - hashtable_unlock(hashtable); return false; } -- Gitblit v1.8.0