7 #ifndef __FWTHREAD_TASKHANDLER_HPP__ 8 #define __FWTHREAD_TASKHANDLER_HPP__ 39 mutable std::packaged_task<R> m_task;
48 #include <fwThread/TaskHandler.hxx> 50 #endif //__FWTHREAD_TASKHANDLER_HPP__ TaskHandler & operator=(const TaskHandler &)
Copy constructor forbidden.
TaskHandler(std::packaged_task< R > &task)
Constructor, moves task.
void operator()() const
Executes intern packaged task.
This class encapsulates packaged task and provides a copy constructor.
std::function< void() > moveTaskIntoFunction(std::packaged_task< R > &task)
Encapsulate a packaged_task into a boost function to be easily posted on a worker.
This namespace fwThread provides few tools to execute asynchronous tasks on different threads...