|
Windows C++ Library
|
#include <ThreadPool.hpp>
Public Member Functions | |
| CThreadPool (size_t nThreads) | |
| ~CThreadPool () | |
| void | Start () |
| void | Stop () |
| void | AddJob (ThreadJobPtr &pJob) |
| void | CancelJob (ThreadJobPtr &pJob) |
| void | CancelAllJobs () |
| void | ClearCompletedJobs () |
| void | DeleteCompletedJobs () |
| size_t | PendingJobCount () const |
| size_t | RunningJobCount () const |
| size_t | CompletedJobCount () const |
Protected Types | |
| enum | Status { STOPPED, RUNNING } |
| typedef Core::SharedPtr < ThreadPoolThread > | ThreadPoolThreadPtr |
| typedef std::vector < ThreadPoolThreadPtr > | CThreads |
| typedef std::vector< ThreadJobPtr > | CJobQueue |
Protected Member Functions | |
| void | ScheduleJob () |
| void | OnJobCompleted (ThreadJobPtr &pJob) |
Protected Attributes | |
| size_t | m_nThreads |
| Status | m_eStatus |
| CThreads | m_oPool |
| CJobQueue | m_oPendingQ |
| CJobQueue | m_oRunningQ |
| CJobQueue | m_oCompletedQ |
| CCriticalSection | m_oLock |
Friends | |
| class | ThreadPoolThread |
typedef Core::SharedPtr<ThreadPoolThread> CThreadPool::ThreadPoolThreadPtr [protected] |
typedef std::vector<ThreadPoolThreadPtr> CThreadPool::CThreads [protected] |
typedef std::vector<ThreadJobPtr> CThreadPool::CJobQueue [protected] |
enum CThreadPool::Status [protected] |
| CThreadPool::CThreadPool | ( | size_t | nThreads | ) |
| void CThreadPool::Start | ( | ) |
| void CThreadPool::Stop | ( | ) |
| void CThreadPool::AddJob | ( | ThreadJobPtr & | pJob | ) |
| void CThreadPool::CancelJob | ( | ThreadJobPtr & | pJob | ) |
| void CThreadPool::CancelAllJobs | ( | ) |
| void CThreadPool::ClearCompletedJobs | ( | ) |
| void CThreadPool::DeleteCompletedJobs | ( | ) |
| size_t CThreadPool::PendingJobCount | ( | ) | const [inline] |
| size_t CThreadPool::RunningJobCount | ( | ) | const [inline] |
| size_t CThreadPool::CompletedJobCount | ( | ) | const [inline] |
| void CThreadPool::ScheduleJob | ( | ) | [protected] |
| void CThreadPool::OnJobCompleted | ( | ThreadJobPtr & | pJob | ) | [protected] |
friend class ThreadPoolThread [friend] |
size_t CThreadPool::m_nThreads [protected] |
Status CThreadPool::m_eStatus [protected] |
CThreads CThreadPool::m_oPool [protected] |
CJobQueue CThreadPool::m_oPendingQ [protected] |
CJobQueue CThreadPool::m_oRunningQ [protected] |
CJobQueue CThreadPool::m_oCompletedQ [protected] |
CCriticalSection CThreadPool::m_oLock [protected] |
1.7.6.1