1 #ifndef FWCore_Utilities_SingleConsumerQ_h 2 #define FWCore_Utilities_SingleConsumerQ_h 39 #include <condition_variable> 61 {
return b.getConsumerBuffer(); }
70 {
return b.getProducerBuffer(); }
86 void*
buffer()
const {
return v_.ptr_; }
87 int size()
const {
return v_.len_; }
88 void commit(
int theSize=0) { T::commit(b_, v_.ptr_, theSize); committed_=
true; }
117 typedef std::vector<void*>
Pool;
std::condition_variable pop_cond_
static boost::mutex mutex
static void commit(SingleConsumerQ &b, void *v, int size)
void releaseConsumerBuffer(void *)
OperateBuffer(SingleConsumerQ &b)
static void release(SingleConsumerQ &b, void *v)
std::vector< void * > Pool
SingleConsumerQ::Buffer v_
Buffer getProducerBuffer()
std::vector< Buffer > Queue
void releaseProducerBuffer(void *)
std::condition_variable pool_cond_
OperateBuffer< ProducerType > ProducerBuffer
OperateBuffer< ConsumerType > ConsumerBuffer
std::condition_variable push_cond_
T const & get(Event const &event, InputTag const &tag)
static void commit(SingleConsumerQ &b, void *v, int size)
void commit(int theSize=0)
std::vector< char > ByteArray
void commitProducerBuffer(void *, int)
void commitConsumerBuffer(void *, int)
int maxQueueDepth() const
static void release(SingleConsumerQ &b, void *v)
Buffer getConsumerBuffer()
SingleConsumerQ(int max_event_size, int max_queue_depth)