Little fix of order of destruction in stress tests

This commit is contained in:
sangelovic
2020-01-19 18:57:14 +01:00
parent f41d9bc395
commit 4310a3bd17
3 changed files with 23 additions and 4 deletions

View File

@@ -737,6 +737,24 @@ PlainMessage createPlainMessage()
sd_bus* bus_{};
} busReferenceKeeper{bus};
// thread_local struct BusKeeper
// {
// BusKeeper()
// {
// auto r = sd_bus_open_system(&bus);
// sd_bus_flush(bus);
// SDBUS_THROW_ERROR_IF(r < 0, "Failed to get default system bus", -r);
// }
// ~BusKeeper()
// {
// sd_bus_flush_close_unref(bus);
// }
// sd_bus* bus{};
// internal::SdBus intf;
// } busKeeper;
// Shelved here as handy thing for potential future tracing purposes:
//#include <unistd.h>
//#include <sys/syscall.h>