Thread++
Client-Server Multithreading with C++
Public Member Functions | Protected Member Functions | List of all members
CThreadManager Class Reference

Thread manager. More...

#include <ThreadManager.h>

Inheritance diagram for CThreadManager:

Public Member Functions

 CThreadManager ()
 Constructor. More...
 

Protected Member Functions

void ProcessTask (CTask *)
 Process the result of a task. More...
 

Detailed Description

The thread manager takes care of the health and feeding of the threads. It is derived from CBaseThreadManager<CTask>. It has a function CThreadManager::ProcessTask() which overrides the virtual function CBaseThreadManager::ProcessTask() in order to process the results stored in the completed task descriptor.

Constructor & Destructor Documentation

◆ CThreadManager()

CThreadManager::CThreadManager ( )

Default constructor. All this does is call the CBaseThreadManager default constructor. If you have any initialization code, then it should go here.

Member Function Documentation

◆ ProcessTask()

void CThreadManager::ProcessTask ( CTask pTask)
protected

Overrides the virtual function CBaseThreadManager::ProcessTask() in order to process the results stored in the completed task descriptor. In this case it means printing to the console a list of a task identifiers and the thread identifier of the thread that completed each task. Your task processing code should go here instead.

Parameters
pTaskPointer to a task descriptor.