-
blocking_queue
: a blocking queue for multi-producer-multi-consumer systems- usage:
auto* bq = new newplan_toolkit::BlockingQueue();
- usage:
-
spsc_queue
: an asynchronious queue for single-producer-single-consumer systems [high-performance]- usage:
-
create
auto *spsc_q = new newplan_toolkit::SPSCQueue(102400);
-
insert
spsc_q->push(data);
-
pop
new_data = spsc_q->blocking_pop();//blocking do { recv_ptr = spsc_q->front();//non-blocking } while (recv_ptr == nullptr); spsc_q->pop();
-
- usage:
- readerwriterqueue : single-produce-single-consumer queue, https://github.com/cameron314/readerwriterqueue
- concurrentqueue : multiple-produce-multiple-consumer queue, https://github.com/cameron314/concurrentqueue