pgLab/core/ControllableTask.h
eelke 15bee33076 Made step to remove ASyncWindow in favour of usage of Future and FutureWatcher.
This should allow concurrency in the plugins to be independent from their container.

Contains also some work on the system for registering plugins.
2018-12-30 15:46:15 +01:00

20 lines
418 B
C++

#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"
class TaskControl;
template <class T>
class ControllableTask
{
public:
using Result = T;
virtual ~ControllableTask() {}
virtual Result run(TaskControl& control) = 0;
};
#endif // CONTROLLABLETASK_H