diff options
Diffstat (limited to 'dep/include/zthread/PoolExecutor.h')
-rw-r--r-- | dep/include/zthread/PoolExecutor.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/dep/include/zthread/PoolExecutor.h b/dep/include/zthread/PoolExecutor.h index 82f5c4f05ba..03df37d9f77 100644 --- a/dep/include/zthread/PoolExecutor.h +++ b/dep/include/zthread/PoolExecutor.h @@ -28,7 +28,7 @@ #include "zthread/Thread.h" namespace ZThread { - + namespace { class ExecutorImpl; } /** @@ -38,33 +38,33 @@ namespace ZThread { * @date <2003-07-16T22:41:07-0400> * @version 2.3.0 * - * A PoolExecutor spawns a set of threads that are used to run tasks + * A PoolExecutor spawns a set of threads that are used to run tasks * that are submitted in parallel. A PoolExecutor supports the following * optional operations, * - * - <em>cancel</em>()ing a PoolExecutor will cause it to stop accepting - * new tasks. + * - <em>cancel</em>()ing a PoolExecutor will cause it to stop accepting + * new tasks. * - * - <em>interrupt</em>()ing a PoolExecutor will cause the any thread running - * a task which was submitted prior to the invocation of this function to + * - <em>interrupt</em>()ing a PoolExecutor will cause the any thread running + * a task which was submitted prior to the invocation of this function to * be interrupted during the execution of that task. * - * - <em>wait</em>()ing on a PoolExecutor will block the calling thread + * - <em>wait</em>()ing on a PoolExecutor will block the calling thread * until all tasks that were submitted prior to the invocation of this function * have completed. - * + * * @see Executor. */ class PoolExecutor : public Executor { - //! Reference to the internal implementation + //! Reference to the internal implementation CountedPtr< ExecutorImpl > _impl; - + //! Cancellation task Task _shutdown; public: - + /** * Create a PoolExecutor * @@ -77,19 +77,19 @@ namespace ZThread { /** * Invoking this function causes each task that had been submitted prior to - * this function to be interrupted. Tasks submitted after the invocation of + * this function to be interrupted. Tasks submitted after the invocation of * this function are unaffected. * * @post Any task submitted prior to the invocation of this function will be - * run in the context of an interrupted thread. - * @post Any thread already executing a task which was submitted prior to the - * invocation of this function will be interrupted. + * run in the context of an interrupted thread. + * @post Any thread already executing a task which was submitted prior to the + * invocation of this function will be interrupted. */ virtual void interrupt(); /** * Alter the number of threads being used to execute submitted tasks. - * + * * @param n number of worker threads. * * @pre <i>n</i> must be greater than 0. @@ -99,21 +99,21 @@ namespace ZThread { * <i>n</i> is less than 1. */ void size(size_t n); - + /** * Get the current number of threads being used to execute submitted tasks. * * @return n number of worker threads. */ size_t size(); - + /** - * Submit a task to this Executor. + * Submit a task to this Executor. * * This will not block the calling thread very long. The submitted task will * be executed at some later point by another thread. - * - * @param task Task to be run by a thread managed by this executor + * + * @param task Task to be run by a thread managed by this executor * * @pre The Executor should have been canceled prior to this invocation. * @post The submitted task will be run at some point in the future by this Executor. @@ -135,7 +135,7 @@ namespace ZThread { * @see Cancelable::isCanceled() */ virtual bool isCanceled(); - + /** * Block the calling thread until all tasks submitted prior to this invocation * complete. @@ -151,21 +151,21 @@ namespace ZThread { * Block the calling thread until all tasks submitted prior to this invocation * complete or until the calling thread is interrupted. * - * @param timeout maximum amount of time, in milliseconds, to wait for the + * @param timeout maximum amount of time, in milliseconds, to wait for the * currently submitted set of Tasks to complete. * * @exception Interrupted_Exception thrown if the calling thread is interrupted * before the set of tasks being wait for can complete. * - * @return - * - <em>true</em> if the set of tasks being wait for complete before + * @return + * - <em>true</em> if the set of tasks being wait for complete before * <i>timeout</i> milliseconds elapse. * - <em>false</em> otherwise. * * @see Waitable::wait(unsigned long timeout) */ virtual bool wait(unsigned long timeout); - + }; /* PoolExecutor */ |