1 #if !defined(_CUA_CONCURRENT_H_)
2 #define _CUA_CONCURRENT_H_
33 #include <boost/thread.hpp>
54 template<
typename T,
typename TConten
idor = std::deque<T> >
96 throw (boost::thread_exception, boost::thread_interrupted)
100 while (
impl_.empty()) {
102 const bool ok =
cond_.timed_wait(lock, ms);
107 desti =
impl_.front();
121 throw (boost::thread_exception, boost::thread_interrupted)
124 while (
impl_.empty()) {
127 boost::posix_time::millisec(1);
128 desti =
impl_.front();
139 const bool cal_notificar =
impl_.empty();
140 impl_.push_back(element);
156 boost::try_mutex::scoped_try_lock lock(
mtx_);
157 if (!lock ||
impl_.empty()) {
160 desti =
impl_.front();
173 boost::try_mutex::scoped_try_lock lock(
mtx_);
177 impl_.push_back(element);
186 boost::mutex::scoped_lock lock(
mtx_);
187 return impl_.empty();
195 boost::mutex::scoped_lock lock(
mtx_);
207 return impl_.front();
214 return impl_.front();
240 #endif // _CUA_CONCURRENT_H_