diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-29 21:16:15 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-05-29 21:16:15 +0400 |
commit | 6249432407af8730c10bccc7894c0725fcaf5e47 (patch) | |
tree | 3ac1f094b9fdc199b04bc5ef209ce00e3596e37d /moses/ThreadPool.h | |
parent | 59bd7deb4b6b9c4f7b3b7dbb055783528fbc31ca (diff) |
beautify
Diffstat (limited to 'moses/ThreadPool.h')
-rw-r--r-- | moses/ThreadPool.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/moses/ThreadPool.h b/moses/ThreadPool.h index fad236a98..bf981a2da 100644 --- a/moses/ThreadPool.h +++ b/moses/ThreadPool.h @@ -42,7 +42,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA /** * Classes to implement a ThreadPool. **/ -namespace Moses { +namespace Moses +{ /** A task to be executed by the ThreadPool */ @@ -50,7 +51,9 @@ class Task { public: virtual void Run() = 0; - virtual bool DeleteAfterExecution() { return true; } + virtual bool DeleteAfterExecution() { + return true; + } virtual ~Task() {} }; @@ -58,7 +61,7 @@ public: class ThreadPool { - public: +public: /** * Construct a thread pool of a fixed size. **/ @@ -82,7 +85,9 @@ class ThreadPool /** * Set maximum number of queued threads (otherwise Submit blocks) **/ - void SetQueueLimit( size_t limit ) { m_queueLimit = limit; } + void SetQueueLimit( size_t limit ) { + m_queueLimit = limit; + } private: /** @@ -109,7 +114,7 @@ public: #ifdef BOOST_HAS_PTHREADS pthread_t tid = pthread_self(); #else - typedef void * pthread_t; + typedef void * pthread_t; pthread_t tid = 0; #endif std::cerr << "Executing " << m_id << " in thread id " << tid << std::endl; |