Fix sporadic race condition between Variant and underlying bus

The underlying bus was thread_local, but the design assumption that Variants built on top of that instance won't outlive the thread was incorrect. In stress tests, Variants were moved (and this is completely legal) to a different thread.
This commit is contained in:
sangelovic
2020-01-25 22:31:41 +01:00
parent 245db893b8
commit 75709e31f1
8 changed files with 43 additions and 60 deletions
+1 -1
View File
@@ -80,11 +80,11 @@ namespace sdbus { namespace internal {
, const sd_bus_vtable* vtable
, void* userData ) override;
PlainMessage createPlainMessage() const override;
MethodCall createMethodCall( const std::string& destination
, const std::string& objectPath
, const std::string& interfaceName
, const std::string& methodName ) const override;
Signal createSignal( const std::string& objectPath
, const std::string& interfaceName
, const std::string& signalName ) const override;