57 inline void wait()
const;
60 inline bool isDone()
const;
70 std::unique_lock<std::mutex> lock(
mutex_);
77 std::unique_lock<std::mutex> lock(
mutex_);
87 template <
typename ReturnType>
91 FilterJob(
const std::function<ReturnType()>& exec) :
Job(), exec_(exec)
98 std::function<ReturnType()> exec_;
102 template <
typename ReturnType>
105 std::unique_lock<std::mutex> lock(
mutex_);
110 condition_.notify_all();
113 template <
typename ReturnType>
129 std::unique_lock<std::mutex> lock(
mutex_);
138 std::function<void()> exec_;
FilterJob(const std::function< void()> &exec)
FilterJob(const std::function< ReturnType()> &exec)
const ReturnType & getResult() const
This class is used to execute functions within the thread that holds the OpenGL context.
std::condition_variable condition_
MOVEIT_CLASS_FORWARD(Job)