1 #ifndef TEMPLATE_QUEUE_H
2 #define TEMPLATE_QUEUE_H
5 #include <boost/thread.hpp>
6 #include <boost/chrono.hpp>
7 #include <boost/thread.hpp>
8 #include <boost/chrono.hpp>
24 boost::mutex::scoped_lock mlock(
mutex_);
33 boost::mutex::scoped_lock mlock(
mutex_);
40 boost::mutex::scoped_lock mlock(
mutex_);
42 boost::posix_time::time_duration td = boost::posix_time::millisec(timeOutInMs);
43 while (
queue_.empty() && (ret ==
true))
45 ret =
cond_.timed_wait(mlock, td);
52 boost::mutex::scoped_lock mlock(
mutex_);
64 boost::mutex::scoped_lock mlock(
mutex_);
75 boost::mutex::scoped_lock mlock(
mutex_);
83 boost::mutex::scoped_lock mlock(
mutex_);
92 boost::condition_variable
cond_;