diff options
author | Maxim Pimenov <m@maps.me> | 2018-03-23 16:56:06 +0300 |
---|---|---|
committer | Tatiana Yan <tatiana.kondakova@gmail.com> | 2018-03-23 19:52:14 +0300 |
commit | 87ea0ef32e99aa8315e99b6ea563ee1daec52c58 (patch) | |
tree | 5e8cc2f53715d787ede2a5062dc2f27ca5f29d8e /base | |
parent | daebd4db1c720278807bedff54262d1d1fe53951 (diff) |
[base] Changed the namespace of Cancellable from my to base.
Diffstat (limited to 'base')
-rw-r--r-- | base/cancellable.hpp | 14 | ||||
-rw-r--r-- | base/thread.hpp | 2 | ||||
-rw-r--r-- | base/threaded_container.cpp | 2 | ||||
-rw-r--r-- | base/threaded_container.hpp | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/base/cancellable.hpp b/base/cancellable.hpp index 4eb5787769..a43713e1f2 100644 --- a/base/cancellable.hpp +++ b/base/cancellable.hpp @@ -2,10 +2,10 @@ #include <atomic> -namespace my +namespace base { -/// This class is a helper thread-safe class which can be mixed in -/// classes which represent some cancellable activities. +// This is a helper thread-safe class which can be mixed in +// classes which represent some cancellable activities. class Cancellable { public: @@ -13,16 +13,16 @@ public: virtual ~Cancellable() {} - /// Marks current activity as not cancelled. + // Marks current activity as not cancelled. virtual void Reset() { m_cancelled = false; } - /// Marks current activity as cancelled. + // Marks current activity as cancelled. virtual void Cancel() { m_cancelled = true; } - /// \return True is current activity is cancelled. + // Returns true iff current activity has been cancelled. virtual bool IsCancelled() const { return m_cancelled; } private: std::atomic<bool> m_cancelled; }; -} // namespace my +} // namespace base diff --git a/base/thread.hpp b/base/thread.hpp index 88eb7cdf20..e66bbf35a1 100644 --- a/base/thread.hpp +++ b/base/thread.hpp @@ -21,7 +21,7 @@ namespace threads { -class IRoutine : public my::Cancellable +class IRoutine : public base::Cancellable { public: /// Perform the main task. diff --git a/base/threaded_container.cpp b/base/threaded_container.cpp index c3e44a94e7..3daed01eeb 100644 --- a/base/threaded_container.cpp +++ b/base/threaded_container.cpp @@ -3,6 +3,6 @@ void ThreadedContainer::Cancel() { threads::ConditionGuard g(m_Cond); - my::Cancellable::Cancel(); + base::Cancellable::Cancel(); m_Cond.Signal(true); } diff --git a/base/threaded_container.hpp b/base/threaded_container.hpp index 3e46abfb26..d5d2c004d8 100644 --- a/base/threaded_container.hpp +++ b/base/threaded_container.hpp @@ -4,7 +4,7 @@ #include "base/condition.hpp" #include "base/timer.hpp" -struct ThreadedContainer : public my::Cancellable +struct ThreadedContainer : public base::Cancellable { protected: |