37 #ifndef MOVEIT_MESH_FILTER_FILTER_JOB_ 38 #define MOVEIT_MESH_FILTER_FILTER_JOB_ 41 #include <boost/thread/condition.hpp> 42 #include <boost/thread/mutex.hpp> 43 #include <boost/thread/locks.hpp> 59 inline void wait()
const;
62 inline bool isDone()
const;
72 boost::unique_lock<boost::mutex> lock(
mutex_);
79 boost::unique_lock<boost::mutex> lock(
mutex_);
89 template <
typename ReturnType>
93 FilterJob(
const boost::function<ReturnType()>& exec) :
Job(), exec_(exec)
97 const ReturnType& getResult()
const;
100 boost::function<ReturnType()>
exec_;
104 template <
typename ReturnType>
107 boost::unique_lock<boost::mutex> lock(
mutex_);
115 template <
typename ReturnType>
131 boost::unique_lock<boost::mutex> lock(
mutex_);
FilterJob(const boost::function< void()> &exec)
This class is used to execute functions within the thread that holds the OpenGL context.
MOVEIT_CLASS_FORWARD(Job)
boost::function< ReturnType()> exec_
const ReturnType & getResult() const
boost::condition_variable condition_
boost::function< void()> exec_
FilterJob(const boost::function< ReturnType()> &exec)