diff options
author | Kargatum <dowlandtop@yandex.com> | 2020-09-12 03:50:48 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-12 03:50:48 +0700 |
commit | 3a0b0356ac2314d6e83ec9b52cddcfb15bf0da8a (patch) | |
tree | 916c49701ec8dc4bdb59ed0e5722740107df2d3d /src/common/Threading/Threading.h | |
parent | e15a4939275e14b4d8ee2df94049edb34d57954e (diff) |
refactor(Core/Common): restyle common lib with astyle (#3461)
Diffstat (limited to 'src/common/Threading/Threading.h')
-rw-r--r-- | src/common/Threading/Threading.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/common/Threading/Threading.h b/src/common/Threading/Threading.h index 6a15d8eb85..8d1c7a186c 100644 --- a/src/common/Threading/Threading.h +++ b/src/common/Threading/Threading.h @@ -17,18 +17,18 @@ namespace acore { class Runnable { - public: - virtual ~Runnable() {} - virtual void run() = 0; + public: + virtual ~Runnable() {} + virtual void run() = 0; - void incReference() { ++m_refs; } - void decReference() - { - if (!--m_refs) - delete this; - } - private: - std::atomic_long m_refs; + void incReference() { ++m_refs; } + void decReference() + { + if (!--m_refs) + delete this; + } + private: + std::atomic_long m_refs; }; enum Priority @@ -44,28 +44,28 @@ namespace acore class Thread { - public: - Thread(); - explicit Thread(Runnable* instance); - ~Thread(); + public: + Thread(); + explicit Thread(Runnable* instance); + ~Thread(); - bool wait(); - void destroy(); + bool wait(); + void destroy(); - void setPriority(Priority type); + void setPriority(Priority type); - static void Sleep(unsigned long msecs); - static std::thread::id currentId(); + static void Sleep(unsigned long msecs); + static std::thread::id currentId(); - private: - Thread(const Thread&); - Thread& operator=(const Thread&); + private: + Thread(const Thread&); + Thread& operator=(const Thread&); - static void ThreadTask(void* param); + static void ThreadTask(void* param); - Runnable* const m_task; - std::thread::id m_iThreadId; - std::thread m_ThreadImp; + Runnable* const m_task; + std::thread::id m_iThreadId; + std::thread m_ThreadImp; }; } #endif |