Fennel: PooledThread Class Reference (original) (raw)
PooledThread is a Thread working for a ThreadPool. More...
Inheritance diagram for PooledThread:

| Public Member Functions | |
|---|---|
| PooledThread (ThreadPoolBase &poolInit) | |
| virtual void | run () |
| virtual void | start () |
| Spawns the OS thread. | |
| void | join () |
| Waits for the OS thread to terminate. | |
| bool | isStarted () const |
| **Returns:**true if start has been called (and subsequent join has not completed) | |
| bool | isStopped () const |
| **Returns:**opposite of isStarted() | |
| boost::thread & | getBoostThread () |
| Accesses the underlying boost::thread, e.g. | |
| std::string | getName () |
| void | setName (std::string const &s) |
| Protected Member Functions | |
| void | initAndRun () |
| virtual void | beforeRun () |
| virtual void | afterRun () |
| Protected Attributes | |
| boost::thread * | pBoostThread |
| bool | bRunning |
| std::string | name |
| Private Attributes | |
| ThreadPoolBase & | pool |
Detailed Description
PooledThread is a Thread working for a ThreadPool.
Definition at line 34 of file ThreadPool.cpp.
Constructor & Destructor Documentation
| PooledThread::PooledThread | ( | ThreadPoolBase & | poolInit | ) | [inline, explicit] |
|---|
Member Function Documentation
| virtual void PooledThread::run | ( | | ) | [inline, virtual] | | ------------------------------ | - | | - | ------------------- |
| void Thread::initAndRun | ( | | ) | [protected, inherited] | | ----------------------- | - | | - | ------------------------ |
| void Thread::beforeRun | ( | | ) | [protected, virtual, inherited] | | ---------------------- | - | | - | --------------------------------- |
| void Thread::afterRun | ( | | ) | [protected, virtual, inherited] | | --------------------- | - | | - | --------------------------------- |
| void Thread::start | ( | | ) | [virtual, inherited] | | ------------------ | - | | - | ---------------------- |
| void Thread::join | ( | | ) | [inherited] | | ----------------- | - | | - | ------------- |
| bool Thread::isStarted | ( | | ) | const [inline, inherited] | | ---------------------- | - | | - | --------------------------- |
| bool Thread::isStopped | ( | | ) | const [inline, inherited] | | ---------------------- | - | | - | --------------------------- |
| boost::thread& Thread::getBoostThread | ( | | ) | [inline, inherited] | | ------------------------------------- | - | | - | --------------------- |
Accesses the underlying boost::thread, e.g.
for use in a boost::thread_group. This thread must already be started.
Returns:
the underlying boost::thread
Definition at line 90 of file Thread.h.
| std::string Thread::getName | ( | | ) | [inline, inherited] | | --------------------------- | - | | - | --------------------- |
Definition at line 96 of file Thread.h.
00097 { 00098 return name; 00099 }
| void Thread::setName | ( | std::string const & | s | ) | [inline, inherited] |
|---|
Member Data Documentation
The documentation for this class was generated from the following file:
- /home/pub/open/dev/fennel/synch/ThreadPool.cpp
