aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/thread/TaskRunnerGetter.h
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-10-27 13:21:03 +0000
committersaturneric <[email protected]>2023-10-27 13:21:03 +0000
commit41c12e92031284e357bab04fe6e08b45c6dd3ba8 (patch)
treee5750afe5feee6cca15aa9b3b0915012047e3aba /src/core/thread/TaskRunnerGetter.h
parentfeat: gather more gnupg info to rt (diff)
downloadGpgFrontend-41c12e92031284e357bab04fe6e08b45c6dd3ba8.tar.gz
GpgFrontend-41c12e92031284e357bab04fe6e08b45c6dd3ba8.zip
feat: improve thread system and gathering gnupg options info to rt
Diffstat (limited to 'src/core/thread/TaskRunnerGetter.h')
-rw-r--r--src/core/thread/TaskRunnerGetter.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/thread/TaskRunnerGetter.h b/src/core/thread/TaskRunnerGetter.h
index f6500a5f..c76de036 100644
--- a/src/core/thread/TaskRunnerGetter.h
+++ b/src/core/thread/TaskRunnerGetter.h
@@ -34,6 +34,8 @@
namespace GpgFrontend::Thread {
+using TaskRunnerPtr = std::shared_ptr<TaskRunner>;
+
class GPGFRONTEND_CORE_EXPORT TaskRunnerGetter
: public GpgFrontend::SingletonFunctionObject<TaskRunnerGetter> {
public:
@@ -47,11 +49,11 @@ class GPGFRONTEND_CORE_EXPORT TaskRunnerGetter
TaskRunnerGetter(int channel = SingletonFunctionObject::GetDefaultChannel());
- TaskRunner *GetTaskRunner(
+ TaskRunnerPtr GetTaskRunner(
TaskRunnerType runner_type = kTaskRunnerType_Default);
private:
- std::map<TaskRunnerType, TaskRunner *> task_runners_;
+ std::map<TaskRunnerType, TaskRunnerPtr> task_runners_;
};
} // namespace GpgFrontend::Thread