diff options
author | vng <viktor.govako@gmail.com> | 2012-06-16 10:14:04 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:39:53 +0300 |
commit | bcebd9665a5154c4ccc54ba7b517208e6ba493b4 (patch) | |
tree | f18a66dd74482c1ebd59c00b4754ce85719782a6 /base | |
parent | 738d0aed2c1af524e75141d12177d02d9b09eaef (diff) |
Minor code style fixes.
Diffstat (limited to 'base')
-rw-r--r-- | base/thread.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/base/thread.hpp b/base/thread.hpp index 7f8467a5b2..6432205b60 100644 --- a/base/thread.hpp +++ b/base/thread.hpp @@ -14,13 +14,17 @@ namespace threads { private: bool m_isCancelled; + protected: - bool IsCancelled() { return m_isCancelled; } + inline bool IsCancelled() const { return m_isCancelled; } + public: IRoutine() : m_isCancelled(false) {} virtual ~IRoutine() {} + /// Performing the main task virtual void Do() = 0; + /// Implement this function to respond to the cancellation event. /// Cancellation means that IRoutine should exit as fast as possible. virtual void Cancel() { m_isCancelled = true; } |