VCF::PoolThread Class Reference
This is the specific thread class that the thread pool uses to create the threads for itself. More...
#include <ThreadPool.h>
Inheritance diagram for VCF::PoolThread:

Public Member Functions | |
| PoolThread (ThreadPool *owningThreadPool, uint32 index) | |
| This creates a thread for the pool. | |
| virtual | ~PoolThread () |
| void | cantContinue () |
| virtual bool | run () |
| This is the thread's execution method. | |
Public Attributes | |
| ThreadPool * | pool_ |
| uint32 | id_ |
Detailed Description
This is the specific thread class that the thread pool uses to create the threads for itself.
Constructor & Destructor Documentation
|
||||||||||||
|
This creates a thread for the pool. The constructor takes a pointer to the pool the thread belongs to as well as the thread's index in the pool's thread array. Note that the thread is created with auto deletion flagged off. This means that the thread pool will completely control the lifetime of the thread and it's eventual destruction, as opposed to letting this happen automatically. |
|
|
|
Member Function Documentation
|
|
|
|
|
This is the thread's execution method. All it does is to loop (until it can no longer continue) and wait for work items to be come available in the thread pool this thread has been assigned to. When a work item is returned, if it's non NULL, then the item's run() method is invoked within a try/catch block. After the run() method returns, the item is then deleted.
Reimplemented from VCF::Thread. |
Member Data Documentation
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/FoundationKit/ThreadPool.h
