The C++ framework for developing highly scalable, high performance servers on Windows platforms.

IThreadPoolWorkerThreadFactory Class Reference
[Win32 Threading primitivesInterfacesProtected destructors on abstract base classesAbstract Factory Pattern]

List of all members.


Detailed Description

An interface to create instances of IThreadPoolWorkerThreadCallback. Usually passed to the CThreadPool constructor.

Public Member Functions

virtual
IThreadPoolWorkerThreadCallback
CreateWorkerThread ()=0
 Create and return a worker thread.
virtual void DestroyWorkerThread (IThreadPoolWorkerThreadCallback &thread)=0
 Destroy the worker thread that you created in CreateWorkerThread().
virtual void DisposeOfQueuedItemsAfterShutdown (ULONG_PTR completionKey, DWORD numberOfBytes, IAsyncWorkItem *pWorkItem)=0
 When a thread pool is shutdown and the queue that feeds the pool contains work items this method is called once for each work item that will now never be processed. You should release any resources that the queued item may have used.

Protected Member Functions

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

Constructor & Destructor Documentation

virtual ~IThreadPoolWorkerThreadFactory (  )  [protected, virtual]

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


Member Function Documentation

virtual IThreadPoolWorkerThreadCallback& CreateWorkerThread (  )  [pure virtual]

Create and return a worker thread.

virtual void DestroyWorkerThread ( IThreadPoolWorkerThreadCallback thread  )  [pure virtual]

Destroy the worker thread that you created in CreateWorkerThread().

virtual void DisposeOfQueuedItemsAfterShutdown ( ULONG_PTR  completionKey,
DWORD  numberOfBytes,
IAsyncWorkItem pWorkItem 
) [pure virtual]

When a thread pool is shutdown and the queue that feeds the pool contains work items this method is called once for each work item that will now never be processed. You should release any resources that the queued item may have used.


Generated on Sun Sep 12 19:08:40 2021 for The Server Framework - v7.4 by doxygen 1.5.3