Public Member Functions | |
virtual bool | Initialise ()=0 |
Called once when the thread is first started. The thread should perform any required initialisation and return true if it was able to initialise correctly and false if it has failed to initialise and should be shut down. | |
virtual bool | ProcessEx (const ULONG_PTR completionKey, const DWORD numberOfBytes, IAsyncWorkItem *pWorkItem) |
Called when a work item needs to be processed by the thread. Can indicate that you want to have NoItemsToProcess() called once each time the queue becomes empty by returning 'true'. | |
virtual void | Process (ULONG_PTR completionKey, DWORD numberOfBytes, IAsyncWorkItem *pWorkItem)=0 |
Called when a work item needs to be processed by the thread. | |
virtual bool | NoItemsToProcess () |
Called once when the queue becomes empty if the last call to ProcessEx() or NoItemsToprocess() returned 'true'. | |
virtual void | Shutdown ()=0 |
Called when the thread is being shut down the thread can perform any required clean up tasks here. | |
virtual void | OnProcessException (const _tstring &message)=0 |
Called if an exception leaks from Process. | |
virtual void | OnThreadTerminationException (const _tstring &message)=0 |
Called if a thread is terminated due to an exception. | |
Protected Member Functions | |
virtual | ~IThreadPoolWorkerThreadCallback () |
We never delete instances of this interface; you must manage the lifetime of the class that implements it. |
virtual ~IThreadPoolWorkerThreadCallback | ( | ) | [protected, virtual] |
We never delete instances of this interface; you must manage the lifetime of the class that implements it.
virtual bool Initialise | ( | ) | [pure virtual] |
Called once when the thread is first started. The thread should perform any required initialisation and return true if it was able to initialise correctly and false if it has failed to initialise and should be shut down.
virtual bool ProcessEx | ( | const ULONG_PTR | completionKey, | |
const DWORD | numberOfBytes, | |||
IAsyncWorkItem * | pWorkItem | |||
) | [inline, virtual] |
Called when a work item needs to be processed by the thread. Can indicate that you want to have NoItemsToProcess() called once each time the queue becomes empty by returning 'true'.
virtual void Process | ( | ULONG_PTR | completionKey, | |
DWORD | numberOfBytes, | |||
IAsyncWorkItem * | pWorkItem | |||
) | [pure virtual] |
Called when a work item needs to be processed by the thread.
virtual bool NoItemsToProcess | ( | ) | [inline, virtual] |
Called once when the queue becomes empty if the last call to ProcessEx() or NoItemsToprocess() returned 'true'.
virtual void Shutdown | ( | ) | [pure virtual] |
Called when the thread is being shut down the thread can perform any required clean up tasks here.
virtual void OnProcessException | ( | const _tstring & | message | ) | [pure virtual] |
Called if an exception leaks from Process.
virtual void OnThreadTerminationException | ( | const _tstring & | message | ) | [pure virtual] |
Called if a thread is terminated due to an exception.