Emulate sync D-Bus method call with async implementation underneath to avoid poll race condition

This commit is contained in:
sangelovic
2020-01-12 23:10:19 +01:00
parent cb118f95b7
commit 4688e81534
14 changed files with 760 additions and 592 deletions
+7 -14
View File
@@ -50,20 +50,6 @@ public:
protected:
int32_t doSignalEmission() override
{
static int32_t counter = 0;
emitSimpleSignal();
printf("First simple signal thrown\n");
counter++;
std::this_thread::sleep_for(std::chrono::milliseconds(10));
//emitSimpleSignal();
//printf("Second simple signal thrown\n");
counter++;
return counter;
}
void noArgNoReturn() const
{
}
@@ -211,6 +197,13 @@ protected:
throw sdbus::createError(1, "A test error occurred");
}
void emitTwoSimpleSignals() override
{
emitSimpleSignal();
emitSignalWithMap({});
}
std::string state()
{
return m_state;