From 9e418158e309ce5d02bdf296f3bed2c5d533eee0 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期四, 09 七月 2020 20:11:42 +0800 Subject: [PATCH] udpate --- test/test.h | 24 +++++++++++++++--------- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/test/test.h b/test/test.h index b5e0a01..93df2c0 100644 --- a/test/test.h +++ b/test/test.h @@ -1,11 +1,11 @@ #include "usg_common.h" #include "usg_typedef.h" -#include "SArrayLockFreeQueue.h" -#include "SLinkedLockFreeQueue.h" -#include "QFactory.h" - #include <pthread.h> +#include "shm_queue.h" +#include "shm_allocator.h" +#include <sstream> +//#include "queue_factory.h" +#include <pthread.h> -#define NTHREADS 3 struct Item { @@ -14,6 +14,9 @@ }; + +// typedef shmstring item_t; +typedef int item_t; struct Targ { int key; int start; @@ -21,11 +24,14 @@ }; // 閿�姣佸叡浜唴瀛樺拰淇″彿 -void destroy() { +void destroy(int key) { - SLinkedLockFreeQueue<struct Item> *queue = QFactory::createLinkedLockFreeQueue<struct Item> (1, 10); - queue->~SLinkedLockFreeQueue(); - mm_deinit(); + // LockFreeQueue<struct Item> *queue = QueueFactory::createQueue<struct Item> (1, 16); + // //queue->~LockFreeQueue(); + // delete queue; + + //QueueFactory::dropQueue<struct Item>(key); + // mm_destroy(); } -- Gitblit v1.8.0