pgLab/core/ControllableTask.h

19 lines
373 B
C
Raw Normal View History

#ifndef CONTROLLABLETASK_H
#define CONTROLLABLETASK_H
/** From answer by Hatter
*
* https://stackoverflow.com/questions/5423058/qfuture-that-can-be-cancelled-and-report-progress
*/
#include "TaskControl.h"
template <class T>
class ControllableTask
{
public:
virtual ~ControllableTask() {}
virtual T run(TaskControl& control) = 0;
};
#endif // CONTROLLABLETASK_H