Skip to content

Latest commit

 

History

History

queue

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Collections of Queues

  • blocking_queue: a blocking queue for multi-producer-multi-consumer systems

    • usage:
      auto* bq = new newplan_toolkit::BlockingQueue();
  • 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();

Other Useful Implementations