#include <single_exec.h>

Public Member Functions | |
| SingleExecutor () | |
| virtual | ~SingleExecutor () |
| void | execute (Runnable *task) |
| Execute a task with another thread. | |
| auto_ptr< Future > | submit (Runnable *task) |
| Execute a task with one thread from internal thread pool. | |
| virtual void | shutdown () |
| Mark the executor as shutdown state, which mean executor will throw an exception when execute(Runnable*) or submit(Runnable *) are called in future. | |
| virtual void | halt () |
| call this method to mark executor as halt. No further tasks can be accepted by the executor. Tasks already submitted but not started will be canceled. TODO: this function shoud return a list of un-started tasks | |
Protected Member Functions | |
| virtual bool | finished () |
| amino::SingleExecutor::SingleExecutor | ( | ) | [inline] |
| virtual amino::SingleExecutor::~SingleExecutor | ( | ) | [inline, virtual] |
| void amino::SingleExecutor::execute | ( | Runnable * | task | ) | [inline] |
Execute a task with another thread.
| std::logic_error | when the executor is already shutdown. |
| virtual void amino::SingleExecutor::shutdown | ( | ) | [inline, virtual] |
Mark the executor as shutdown state, which mean executor will throw an exception when execute(Runnable*) or submit(Runnable *) are called in future.
Implements amino::ExecutorService.
| virtual void amino::SingleExecutor::halt | ( | ) | [inline, virtual] |
call this method to mark executor as halt. No further tasks can be accepted by the executor. Tasks already submitted but not started will be canceled. TODO: this function shoud return a list of un-started tasks
Implements amino::ExecutorService.
| virtual bool amino::SingleExecutor::finished | ( | ) | [inline, protected, virtual] |
Implements amino::ExecutorService.
1.5.6