1 #ifndef TEMPLATE_QUEUE_H 2 #define TEMPLATE_QUEUE_H 4 #include <boost/thread.hpp> 5 #include <boost/chrono.hpp> 6 #include <boost/thread.hpp> 7 #include <boost/chrono.hpp> 22 boost::mutex::scoped_lock mlock(
mutex_);
32 boost::mutex::scoped_lock mlock(
mutex_);
39 boost::mutex::scoped_lock mlock(
mutex_);
41 boost::posix_time::time_duration td = boost::posix_time::millisec(timeOutInMs);
42 while (
queue_.empty() && (ret ==
true))
44 ret =
cond_.timed_wait(mlock, td);
51 boost::mutex::scoped_lock mlock(
mutex_);
63 boost::mutex::scoped_lock mlock(
mutex_);
74 boost::mutex::scoped_lock mlock(
mutex_);
82 boost::mutex::scoped_lock mlock(
mutex_);
void wait(unique_lock< mutex > &m)
boost::condition_variable cond_
bool waitForIncomingObject(int timeOutInMs)
void notify_one() BOOST_NOEXCEPT
int getNumberOfEntriesInQueue()
get number of entries in queue