27 #ifndef GPGFRONTEND_TASKRUNNER_H
28 #define GPGFRONTEND_TASKRUNNER_H
34 #include "core/GpgFrontendCore.h"
40 class GPGFRONTEND_CORE_EXPORT
TaskRunner :
public QThread {
59 [[noreturn]]
void run()
override;
68 void PostTask(
Task* task);
76 void PostScheduleTask(
Task* task,
size_t seconds);
82 QThreadPool thread_pool_{
this};
88 void unregister_finished_task(std::string);
Definition: TaskRunner.h:40
std::mutex tasks_mutex_
The task queue mutex.
Definition: TaskRunner.h:81
std::map< std::string, Task * > pending_tasks_
The pending tasks.
Definition: TaskRunner.h:80
std::queue< Task * > tasks
The task queue.
Definition: TaskRunner.h:79
virtual ~TaskRunner() override
Destroy the Task Runner object.
TaskRunner()
Construct a new Task Runner object.
Definition: CtxCheckTask.h:33