#include <thread.h>
Public Member Functions | |
| thread (kernel::module &module) | |
| virtual | ~thread () |
| void | start (void) |
| void | stop (void) |
| size_t | get_id (void) |
| virtual void | run (void)=0 |
Protected Attributes | |
| kernel::module & | _module |
Private Member Functions | |
| thread (const thread &) | |
| thread & | operator= (const thread &) |
Private Attributes | |
| std::auto_ptr< thread_provider > | _thread_provider |
This class represents a thread that applications should derive from.
Definition at line 44 of file thread.h.
| scalestack::threading::thread::thread | ( | kernel::module & | module | ) | [inline] |
This doesn't actually start the thread, derived classes must call start() when the underlying thread should be created. If this did start the thread, the run() method would most likely be started before the derived class was fully constructed.
| [in] | module | Module that the thread is associated with. |
Reimplemented in scalestack::threading::test::thread.
| scalestack::threading::thread::~thread | ( | ) | [inline, virtual] |
Threads should be stopped first with stop() before this destructor is run, otherwise the run() method in derived classes would still be running.
Reimplemented in scalestack::event::libevent::thread.
| scalestack::threading::thread::thread | ( | const thread & | ) | [private] |
Don't allow copying of objects.
| void scalestack::threading::thread::start | ( | void | ) | [inline] |
| void scalestack::threading::thread::stop | ( | void | ) | [inline] |
| size_t scalestack::threading::thread::get_id | ( | void | ) | [inline] |
| virtual void scalestack::threading::thread::run | ( | void | ) | [pure virtual] |
Method that implements the body of the running thread.
Implemented in scalestack::event::libevent::thread, and scalestack::threading::test::thread.
Don't allow assignment of objects.
kernel::module& scalestack::threading::thread::_module [protected] |
std::auto_ptr<thread_provider> scalestack::threading::thread::_thread_provider [private] |
1.6.3