[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

@@ -327,6 +327,13 @@ namespace BlackMisc
//! Called when the thread is finished.
virtual void cleanup() {}
//! Called before quit is called
//! \remark can be used to "clean things up" or request work functions to stop
virtual void beforeQuit() noexcept {}
//! Wait time for quitAndWait, 0 means not waiting
virtual unsigned long waitTimeoutMs() const { return 15 * 1000; }
QTimer m_updateTimer { this }; //!< timer which can be used by implementing classes
private: