diff options
author | saturneric <[email protected]> | 2023-10-18 14:45:33 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-10-18 14:45:33 +0000 |
commit | 70196cf01757824a578e4d9c49a210bf136de266 (patch) | |
tree | e058a59c6289b2a3872222c8822bae393cb7c213 /src/core/GpgContext.cpp | |
parent | fix: solve build issues on macOS (diff) | |
download | GpgFrontend-70196cf01757824a578e4d9c49a210bf136de266.tar.gz GpgFrontend-70196cf01757824a578e4d9c49a210bf136de266.zip |
feat: using pool for concurrent executions, not stable yet
Diffstat (limited to 'src/core/GpgContext.cpp')
-rw-r--r-- | src/core/GpgContext.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/GpgContext.cpp b/src/core/GpgContext.cpp index e6c4d322..059a5179 100644 --- a/src/core/GpgContext.cpp +++ b/src/core/GpgContext.cpp @@ -353,7 +353,8 @@ const GpgInfo &GpgContext::GetInfo(bool refresh) { // get all components GpgCommandExecutor::GetInstance().Execute( info_.GpgConfPath, {"--list-components"}, - [=](int exit_code, const std::string &p_out, const std::string &p_err) { + [this](int exit_code, const std::string &p_out, + const std::string &p_err) { SPDLOG_DEBUG( "gpgconf components exit_code: {} process stdout size: {}", exit_code, p_out.size()); @@ -437,7 +438,8 @@ const GpgInfo &GpgContext::GetInfo(bool refresh) { GpgCommandExecutor::GetInstance().ExecuteConcurrently( info_.GpgConfPath, {"--list-dirs"}, - [=](int exit_code, const std::string &p_out, const std::string &p_err) { + [this](int exit_code, const std::string &p_out, + const std::string &p_err) { SPDLOG_DEBUG( "gpgconf configurations exit_code: {} process stdout size: {}", exit_code, p_out.size()); @@ -495,8 +497,8 @@ const GpgInfo &GpgContext::GetInfo(bool refresh) { GpgCommandExecutor::GetInstance().ExecuteConcurrently( info_.GpgConfPath, {"--check-options", component.first}, - [=](int exit_code, const std::string &p_out, - const std::string &p_err) { + [this, component](int exit_code, const std::string &p_out, + const std::string &p_err) { SPDLOG_DEBUG( "gpgconf {} options exit_code: {} process stdout " "size: {} ", @@ -552,8 +554,8 @@ const GpgInfo &GpgContext::GetInfo(bool refresh) { GpgCommandExecutor::GetInstance().ExecuteConcurrently( info_.GpgConfPath, {"--list-options", component.first}, - [=](int exit_code, const std::string &p_out, - const std::string &p_err) { + [this, component](int exit_code, const std::string &p_out, + const std::string &p_err) { SPDLOG_DEBUG( "gpgconf {} avaliable options exit_code: {} process stdout " "size: {} ", |