cutter/src/utils/AsyncTask.cpp

24 lines
329 B
C++
Raw Normal View History

2018-05-26 16:21:23 +00:00
#include "AsyncTask.h"
void AsyncTask::run()
{
runTask();
emit finished();
}
AsyncTaskManager::AsyncTaskManager(QObject *parent)
: QObject(parent)
{
threadPool = new QThreadPool(this);
}
AsyncTaskManager::~AsyncTaskManager()
{
}
void AsyncTaskManager::start(AsyncTask *task)
{
threadPool->start(task);
}