mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-22 12:56:11 +00:00
24 lines
329 B
C++
24 lines
329 B
C++
|
|
||
|
#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);
|
||
|
}
|