mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
[Worker] In order to make background validation (worker) stoppable, using an "atomic bool stop flag"
Originally Ref T145, Ref T647
This commit is contained in:
committed by
Mat Sutcliffe
parent
9bcc16b94e
commit
7f6e3e5378
@@ -76,14 +76,15 @@ namespace BlackMisc
|
||||
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;
|
||||
//! \copydoc CContinuousWorker::beforeQuit
|
||||
virtual void beforeQuit() noexcept override;
|
||||
|
||||
private:
|
||||
mutable QReadWriteLock m_lock; //!< lock snapshot
|
||||
std::atomic_bool m_inWork { false }; //!< indicates a running update
|
||||
CSimulatorInfo m_simulator; //!< simulator
|
||||
QString m_simDirectory; //!< corresponding sim directory
|
||||
mutable QReadWriteLock m_lock; //!< lock snapshot
|
||||
std::atomic_bool m_inWork { false }; //!< indicates a running update
|
||||
std::atomic_bool m_wasStopped { false }; //!< has been stopped or should be stopped
|
||||
CSimulatorInfo m_simulator; //!< simulator
|
||||
QString m_simDirectory; //!< corresponding sim directory
|
||||
|
||||
// last result values, mostly needed when running in the distributed swift system and we want to get the values
|
||||
CAircraftModelList m_lastResultValid;
|
||||
|
||||
Reference in New Issue
Block a user