IIOCPWorkerThreadCallback Class Reference
[Win32 Threading primitivesWin32 I/O Completion PortsInterfacesProtected non-virtual destructors on abstract base classes]

List of all members.


Detailed Description

An interface to an object that acts as a worker thread for an I/O completion port driven work queue. The life-cycle of an object that implements this interface is as follows: one call to Initialise() (and, if it returns true), 0 or many calls to Process() and then one call to Shutdown().

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 void Process (const ULONG_PTR completionKey, const DWORD numberOfBytes, OVERLAPPED *pOverlapped)=0
 Called when a work item needs to be processed by the thread.
virtual void Shutdown ()=0
 Called when the thread is being shut down the thread can perform any required clean up tasks here.

Protected Member Functions

 ~IIOCPWorkerThreadCallback ()
 We never delete instances of this interface; you must manage the lifetime of the class that implements it.

Constructor & Destructor Documentation

~IIOCPWorkerThreadCallback (  )  [inline, protected]

We never delete instances of this interface; you must manage the lifetime of the class that implements it.


Member Function Documentation

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 void Process ( const ULONG_PTR  completionKey,
const DWORD  numberOfBytes,
OVERLAPPED *  pOverlapped 
) [pure virtual]

Called when a work item needs to be processed by the thread.

virtual void Shutdown (  )  [pure virtual]

Called when the thread is being shut down the thread can perform any required clean up tasks here.


Generated on Tue Oct 2 15:45:40 2007 for JetByte Tools - v5.2 by  doxygen 1.5.3