[Worker] Log. how long it takes to quitAndWait a worker

* sometimes the shutdown sequence of swift takes extremly long, this is to identify which workers are affected
* reduced "wait time"
* function so each worker can have its own "wait" time
* for a worker there are 2 "waits", the quitAndWait of the worker and the wait of CRegularThread (dtor)


Originally Ref T145, T647
This commit is contained in:
Klaus Basan
2020-02-29 19:18:39 +01:00
committed by Mat Sutcliffe
parent 049ded16cc
commit b0d5b3c6d1
4 changed files with 41 additions and 10 deletions

View File

@@ -75,6 +75,10 @@ namespace BlackMisc
//! Validated for simulator
void validated(const CSimulatorInfo &simulator, const CAircraftModelList &validModels, const CAircraftModelList &invalidModels, bool stopped, const CStatusMessageList &msgs);
protected:
//! \copydoc CContinuousWorker::waitTimeoutMs
virtual unsigned long waitTimeoutMs() const override;
private:
mutable QReadWriteLock m_lock; //!< lock snapshot
std::atomic_bool m_inWork { false }; //!< indicates a running update