Delete QDBusServiceWatcher when unloading X-Plane driver.

Summary:
When unloading a sim driver, first its threads are killed, then the driver object is destroyed.

This means that when the `QDBusServiceWatcher` child object is destroyed, it deadlocks waiting for a thread that was already killed (T147).

This change causes the `QDBusServiceWatcher` to be deleted before the driver is unloaded.

Reviewers: #swift_pilot_client, kbasan, rwinklmeier

Reviewed By: #swift_pilot_client, kbasan, rwinklmeier

Subscribers: kbasan, jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D50
This commit is contained in:
Mathew Sutcliffe
2017-09-08 17:49:00 +01:00
parent e2b00f1f9b
commit f1211d328e
2 changed files with 12 additions and 4 deletions

View File

@@ -100,6 +100,7 @@ namespace BlackSimPlugin
virtual bool setTimeSynchronization(bool enable, const BlackMisc::PhysicalQuantities::CTime &offset) override;
virtual BlackMisc::PhysicalQuantities::CTime getTimeSynchronizationOffset() const override { return BlackMisc::PhysicalQuantities::CTime(0, BlackMisc::PhysicalQuantities::CTimeUnit::hrmin()); }
virtual bool setInterpolatorMode(BlackMisc::Simulation::CInterpolatorMulti::Mode mode, const BlackMisc::Aviation::CCallsign &callsign) override;
virtual void unload() override;
//! @}
//! Creates an appropriate dbus connection from the string describing it