SynchronousExecutor Class Reference
#include <SynchronousExecutor.h>
Inheritance diagram for 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) |
virtual void | interrupt ()=0 |
virtual void | execute (const Task &task)=0 |
![]() | |
virtual | ~Cancelable () |
Destroy a Cancelable object. | |
virtual void | cancel ()=0 |
virtual bool | isCanceled ()=0 |
![]() | |
virtual | ~Waitable () |
Destroy a Waitable object. | |
virtual void | wait ()=0 |
virtual bool | wait (unsigned long timeout)=0 |
Detailed Description
- Date
- <2003-07-16T22:33:51-0400>
- Version
- 2.3.0
A SynchronousExecutor is an Executor which runs tasks using the thread that submits the task. It runs tasks serially, one at a time, in the order they were submitted to the executor.
- See also
- Executor.
Member Function Documentation
◆ cancel()
|
virtual |
- See also
- Cancelable::cancel()
Implements Cancelable.
◆ execute()
|
virtual |
Submit a task to this Executor, blocking the calling thread until the task is executed.
- Parameters
-
task Task to be run by a thread managed by this executor
- Precondition
- The Executor should have been canceled prior to this invocation.
- Postcondition
- The submitted task will be run at some point in the future by this Executor.
- Exceptions
-
Cancellation_Exception thrown if the Executor was canceled prior to the invocation of this function.
Implements Executor.
◆ interrupt()
|
virtual |
This operation is not supported by this executor.
Implements Executor.
◆ isCanceled()
|
virtual |
- See also
- Cancelable::cancel()
Implements Cancelable.
◆ wait() [1/2]
|
virtual |
Block the calling thread until all tasks submitted prior to this invocation complete.
- Exceptions
-
Interrupted_Exception thrown if the calling thread is interrupted before the set of tasks being wait for can complete.
- See also
- Executor::wait()
Implements Waitable.
◆ wait() [2/2]
|
virtual |
Block the calling thread until all tasks submitted prior to this invocation complete or until the calling thread is interrupted.
- Parameters
-
timeout - maximum amount of time, in milliseconds, to wait for the currently submitted set of Tasks to complete.
- Exceptions
-
Interrupted_Exception thrown if the calling thread is interrupted before the set of tasks being wait for can complete.
- Returns
- true if the set of tasks being wait for complete before timeout milliseconds elapse.
- false othewise.
Implements Waitable.
The documentation for this class was generated from the following file:
- SynchronousExecutor.h