Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2012-06-16 10:14:04 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:39:53 +0300
commitbcebd9665a5154c4ccc54ba7b517208e6ba493b4 (patch)
treef18a66dd74482c1ebd59c00b4754ce85719782a6 /base
parent738d0aed2c1af524e75141d12177d02d9b09eaef (diff)
Minor code style fixes.
Diffstat (limited to 'base')
-rw-r--r--base/thread.hpp6
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; }