3 #ifndef PCL_OUTOFCORE_MONITOR_QUEUE_IMPL_H_
4 #define PCL_OUTOFCORE_MONITOR_QUEUE_IMPL_H_
6 #include <condition_variable>
10 template<
typename DataT>
15 push (
const DataT& newData)
17 std::lock_guard<std::mutex> lock (monitor_mutex_);
18 queue_.push (newData);
19 item_available_.notify_one ();
25 std::unique_lock<std::mutex> lock (monitor_mutex_);
29 item_available_.wait (lock);
32 DataT temp (queue_.front ());
39 std::queue<DataT> queue_;
40 std::mutex monitor_mutex_;
41 std::condition_variable item_available_;
void push(const DataT &newData)