diff options
author | saturneric <[email protected]> | 2023-10-18 12:54:02 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-10-18 12:54:02 +0000 |
commit | 76fda183d4c1067ab1735965e9bde3c7b29d1345 (patch) | |
tree | 54723eb8698dfe6f7e5dbc4c16b9da16e192d44b /src/core/module/GlobalModuleContext.cpp | |
parent | fix: improve thread and module relation (diff) | |
download | GpgFrontend-76fda183d4c1067ab1735965e9bde3c7b29d1345.tar.gz GpgFrontend-76fda183d4c1067ab1735965e9bde3c7b29d1345.zip |
feat: simplify the thread system and improve its stability
Diffstat (limited to 'src/core/module/GlobalModuleContext.cpp')
-rw-r--r-- | src/core/module/GlobalModuleContext.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/module/GlobalModuleContext.cpp b/src/core/module/GlobalModuleContext.cpp index 7e5f8f00..10c3e549 100644 --- a/src/core/module/GlobalModuleContext.cpp +++ b/src/core/module/GlobalModuleContext.cpp @@ -119,10 +119,10 @@ class GlobalModuleContext::Impl { register_info.module = module; register_info.channel = acquire_new_unique_channel(); register_info.task_runner = std::make_shared<Thread::TaskRunner>(); - register_info.task_runner->start(); + register_info.task_runner->Start(); // move module to its task runner' thread - register_info.module->moveToThread(register_info.task_runner.get()); + register_info.module->moveToThread(register_info.task_runner->GetThread()); // Register the module with its identifier. module_register_table_[module->GetModuleIdentifier()] = @@ -239,7 +239,7 @@ class GlobalModuleContext::Impl { "module {} is listening to event {}, activate state: {}, task runner " "running state: {}", module_info->module->GetModuleIdentifier(), event->GetIdentifier(), - module_info->activate, module_info->task_runner->isRunning()); + module_info->activate, module_info->task_runner->IsRunning()); // Check if the module is activated if (!module_info->activate) continue; |