Base class of active objects.
More...
#include <base/concurrency/Runnable.h>
Inherits Object.
Inherited by Thread.
Base class of active objects.
Base class of active objects. An active object can be run by a thread object.
- See also
- Thread
- Version
- 1.0
- Examples
- testsuite/echod.cpp, testsuite/ftp.cpp, and testsuite/Thread.cpp.
◆ Runnable()
Initializes runnable object.
◆ ~Runnable()
virtual Runnable::~Runnable |
( |
| ) |
|
|
inlinevirtual |
Destroys the runnable object.
◆ isTerminated()
bool Runnable::isTerminated |
( |
| ) |
|
|
inlinenoexcept |
Returns true if the active object should be terminated.
◆ onChild()
virtual void Runnable::onChild |
( |
Thread * |
child | ) |
|
|
inlinevirtualnoexcept |
Invocated when a child thread is completed. Watch out for MT-safety.
- Parameters
-
◆ onTermination()
virtual void Runnable::onTermination |
( |
| ) |
|
|
inlinevirtualnoexcept |
Invocated when the thread is asked to terminate. Watch out for MT-safety.
◆ run()
virtual void Runnable::run |
( |
| ) |
|
|
pure virtual |
Entry point for the thread.
Implemented in Thread.
◆ terminated
bool Runnable::terminated = false |
|
protected |
Specifies that the active object should be terminated.