Base class for active objects.
More...
#include <smartTask.hh>
|
| Task (Smart::IComponent *component=0) |
| Constructor. More...
|
|
virtual | ~Task () |
| Destructor. More...
|
|
virtual int | start () |
| Creates and starts a new thread (if not yet started) More...
|
|
virtual int | start (const ACE_Sched_Params &sched_params, const int &cpuAffinity=-1) |
| control method to start the internal thread using given scheduling parameters More...
|
|
virtual int | stop (const bool wait_till_stopped=true) |
| Closes currently active thread (if it was started before) More...
|
|
|
virtual bool | test_canceled () |
| Tests whether the thread has been signaled to stop. More...
|
|
virtual void | sleep_for (const Smart::Duration &rel_time) |
| Blocks execution of the calling thread during the span of time specified by rel_time. More...
|
|
virtual int | svc (void) |
| implements ACE_Task<ACE_MT_SYNCH> More...
|
|
int | setCpuAffinity (const int &cpuCore) |
|
int | setSchedParams (const ACE_Sched_Params &sched_params) |
|
Base class for active objects.
◆ Task()
SmartACE::Task::Task |
( |
Smart::IComponent * |
component = 0 | ) |
|
◆ ~Task()
virtual SmartACE::Task::~Task |
( |
| ) |
|
|
virtual |
◆ setCpuAffinity()
int SmartACE::Task::setCpuAffinity |
( |
const int & |
cpuCore | ) |
|
|
protected |
◆ setSchedParams()
int SmartACE::Task::setSchedParams |
( |
const ACE_Sched_Params & |
sched_params | ) |
|
|
protected |
◆ sleep_for()
virtual void SmartACE::Task::sleep_for |
( |
const Smart::Duration & |
rel_time | ) |
|
|
protectedvirtual |
Blocks execution of the calling thread during the span of time specified by rel_time.
Thread-sleeping is sometimes platform-specific. This method encapsulates the blocking sleep. Calling this method blocks the execution of the calling thread for a time specified by rel_time.
- Parameters
-
rel_time | relative time duration for the thread to sleep |
◆ start() [1/2]
virtual int SmartACE::Task::start |
( |
| ) |
|
|
virtual |
◆ start() [2/2]
virtual int SmartACE::Task::start |
( |
const ACE_Sched_Params & |
sched_params, |
|
|
const int & |
cpuAffinity = -1 |
|
) |
| |
|
virtual |
control method to start the internal thread using given scheduling parameters
◆ stop()
virtual int SmartACE::Task::stop |
( |
const bool |
wait_till_stopped = true | ) |
|
|
virtual |
◆ svc()
virtual int SmartACE::Task::svc |
( |
void |
| ) |
|
|
protectedvirtual |
implements ACE_Task<ACE_MT_SYNCH>
◆ test_canceled()
virtual bool SmartACE::Task::test_canceled |
( |
| ) |
|
|
protectedvirtual |
Tests whether the thread has been signaled to stop.
This method allows to implement cooperative thread stopping.
The documentation for this class was generated from the following file: