11#ifndef RPCBUFFEREDGET_H
12#define RPCBUFFEREDGET_H
14#include <condition_variable>
17template <
typename TdataType>
22 : d_data_needed(false),
25 d_buffer(init_buffer_size)
39 d_data_needed =
false;
41 d_data_ready.notify_one();
46 std::unique_lock lock(d_buffer_lock);
48 d_data_ready.wait(lock);
Definition: rpcbufferedget.h:19
~rpcbufferedget()
Definition: rpcbufferedget.h:30
void offer_data(const TdataType &data)
Definition: rpcbufferedget.h:32
TdataType get()
Definition: rpcbufferedget.h:44
rpcbufferedget(const unsigned int init_buffer_size=4096)
Definition: rpcbufferedget.h:21
boost::mutex mutex
Definition: thread.h:37
boost::unique_lock< boost::mutex > scoped_lock
Definition: thread.h:38
boost::condition_variable condition_variable
Definition: thread.h:39