Clarisse 4.0 SP5b SDK  4.0.0.0.5.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Friends | List of all members
SysThreadPoolTask Class Referenceabstract

Abstract task to be dispatched by SysThreadPool to worker threads. More...

Inheritance diagram for SysThreadPoolTask:
CoreBaseObject CoreBaseType

Public Member Functions

const unsigned int & get_id () const
 return the id of the worker thread currently running execution_entry()
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
virtual size_t get_memory_size () const
 
CoreString get_class_info_name () const
 
CoreString get_class_interface () const
 
const unsigned long & get_class_info_id () const
 
bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
bool operator== (const CoreBaseObject &obj) const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 
bool operator== (const CoreBaseType &obj) const
 

Protected Member Functions

virtual void execution_entry (const unsigned int &id)=0
 execution entry point to overload to perform the task
 

Friends

class SysThreadPool
 
class SysThreadPoolWorker
 

Additional Inherited Members

- Static Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
static bool ___class_destructor__ (void *instance, const bool &is_array)
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 

Detailed Description

Abstract task to be dispatched by SysThreadPool to worker threads.

A task is simply defined by overloading execution_entry(). The id passed as argument is the unique index of the working thread. For example the if you have 50 workers you will receive a number between 0 and 49. This id is extremely useful if you want to create local thread data storage in an array.

Member Function Documentation

SysThreadPoolTask::execution_entry ( const unsigned int &  id)
protectedpure virtual

execution entry point to overload to perform the task

Parameters
idIndex of the worker thread processing the task.