9#include "MantidKernel/DllConfig.h"
15#include <boost/function.hpp>
72 throw std::runtime_error(
"FunctionTask: NULL method pointer provided.");
A FunctionTask can easily create a Task from a method pointer.
void(*)() voidFunction
Typedef for a function with no arguments and no return.
FunctionTask(std::function< void()> func, double cost=1.0)
Constructor for a simple boost bound function.
FunctionTask(voidFunction func, double cost=1.0)
Constructor for a simple void function.
void run() override
Main method that performs the work for the task.
std::function< void()> m_voidFunc
A Task is a unit of work to be scheduled and run by a ThreadPool.
virtual double cost()
What is the computational cost of this task?
Helper class which provides the Collimation Length for SANS instruments.