#include <SynchronousExecutor.h>
Inheritance diagram for ZThread::SynchronousExecutor:
Public Member Functions | |
SynchronousExecutor () | |
Create a new SynchronousExecutor. | |
virtual | ~SynchronousExecutor () |
Destroy a SynchronousExecutor. | |
virtual void | interrupt () |
virtual void | execute (const Task &task) |
virtual void | cancel () |
virtual bool | isCanceled () |
virtual void | wait () |
virtual bool | wait (unsigned long timeout) |
void ZThread::SynchronousExecutor::cancel | ( | ) | [virtual] |
void ZThread::SynchronousExecutor::execute | ( | const Task & | task | ) | [virtual] |
Submit a task to this Executor, blocking the calling thread until the task is executed.
task | Task to be run by a thread managed by this executor |
Cancellation_Exception | thrown if the Executor was canceled prior to the invocation of this function. |
Implements ZThread::Executor.
void ZThread::SynchronousExecutor::interrupt | ( | ) | [virtual] |
This operation is not supported by this executor.
Implements ZThread::Executor.
bool ZThread::SynchronousExecutor::isCanceled | ( | ) | [virtual] |
bool ZThread::SynchronousExecutor::wait | ( | unsigned long | timeout | ) | [virtual] |
Block the calling thread until all tasks submitted prior to this invocation complete or until the calling thread is interrupted.
timeout | - maximum amount of time, in milliseconds, to wait for the currently submitted set of Tasks to complete. |
Interrupted_Exception | thrown if the calling thread is interrupted before the set of tasks being wait for can complete. |
Implements ZThread::Waitable.
void ZThread::SynchronousExecutor::wait | ( | ) | [virtual] |
Block the calling thread until all tasks submitted prior to this invocation complete.
Interrupted_Exception | thrown if the calling thread is interrupted before the set of tasks being wait for can complete. |
Implements ZThread::Waitable.