refs #833, use isShuttingDown in readers

(a bit stricter than this->isAbandoned)
This commit is contained in:
Klaus Basan
2016-12-15 01:25:58 +01:00
parent 0beb7faf06
commit 5107d55115
7 changed files with 28 additions and 14 deletions

View File

@@ -71,7 +71,10 @@ namespace BlackCore
//! \threadsafe
void pauseReader();
public slots:
//! Is shutting down?
//! \threadsafe
bool isShuttingDown() const;
//! Graceful shutdown
//! \threadsafe
void gracefulShutdown();
@@ -106,6 +109,7 @@ namespace BlackCore
QDateTime m_updateTimestamp; //!< when file/resource was read
uint m_contentHash = 0; //!< has of the content given
std::atomic<bool> m_markedAsFailed { false }; //!< marker if reading failed
std::atomic<bool> m_shutdown { false }; //!< marker it is shutting down
QTimer *m_updateTimer = nullptr;
};
} // namespace