refactor: use async tag to denote async calls or operations

This commit is contained in:
Stanislav Angelovic
2023-12-30 22:06:00 +01:00
parent f7afe3d1b1
commit 106500a555
16 changed files with 115 additions and 103 deletions
+2 -1
View File
@@ -44,7 +44,8 @@ protected:
public:
sdbus::PendingAsyncCall concatenate(const std::map<std::string, sdbus::Variant>& params)
{
return proxy_->callMethodAsync("concatenate").onInterface(INTERFACE_NAME).withArguments(params).uponReplyInvoke([this](const sdbus::Error* error, const std::string& result){ this->onConcatenateReply(result, error); });
using sdbus::async;
return proxy_->callMethod("concatenate", async).onInterface(INTERFACE_NAME).withArguments(params).uponReplyInvoke([this](const sdbus::Error* error, const std::string& result){ this->onConcatenateReply(result, error); });
}
private:
+1 -1
View File
@@ -481,7 +481,7 @@ int main(int argc, char *argv[])
// We could run the loop in a sync way, but we want it to run also when proxies are destroyed for better
// coverage of multi-threaded scenarios, so we run it async and use condition variable for exit notification
//con.enterEventLoop();
con.enterEventLoopAsync();
con.enterEventLoop(sdbus::async);
std::unique_lock<std::mutex> lock(clientThreadExitMutex);
clientThreadExitCond.wait(lock, [&]{return clientThreadExit;});