1 #ifndef messagefacility_Utilities_SingleConsumerQ_h 2 #define messagefacility_Utilities_SingleConsumerQ_h 33 #include <condition_variable> 55 return b.getConsumerBuffer();
73 return b.getProducerBuffer();
91 : b_{b}, v_{T::get(
b)}, committed_{
false}
96 T::release(b_, v_.ptr_);
112 T::commit(b_, v_.ptr_, theSize);
151 using Pool = std::vector<void*>;
std::condition_variable push_cond_
void commitProducerBuffer(void *, int)
std::vector< void * > Pool
SingleConsumerQ operator=(SingleConsumerQ const &)=delete
std::condition_variable pop_cond_
OperateBuffer(SingleConsumerQ &b)
int maxQueueDepth() const
SingleConsumerQ(int const max_event_size, int const max_queue_depth)
Buffer getConsumerBuffer()
std::vector< Buffer > Queue
void releaseProducerBuffer(void *)
SingleConsumerQ::Buffer v_
static void commit(SingleConsumerQ &b, void *v, int size)
Buffer getProducerBuffer()
void commit(int const theSize=0)
Buffer(void *p, int const len)
static void release(SingleConsumerQ &b, void *v)
std::condition_variable pool_cond_
static void release(SingleConsumerQ &b, void *v)
std::vector< char > ByteArray
void releaseConsumerBuffer(void *)
void commitConsumerBuffer(void *, int)
static void commit(SingleConsumerQ &b, void *v, int size)