IIOPool Class Reference
[InterfacesWin32 Threading primitivesI/O BuffersAsynchronous I/OProtected non-virtual destructors on abstract base classes]

Inheritance diagram for IIOPool:

Inheritance graph
[legend]

List of all members.


Detailed Description

An interface to an I/O thread pool (usually based on an I/O completion port) that can have operations on buffers and handlers dispatched to it (either directly or as a result of an I/O completion packet being generated by some asynchronous I/O event) and that handles these events on one of the threads in the pool.

Public Types

typedef size_t ThreadIdentifier

Public Member Functions

virtual void Dispatch (IHandler &handler, IBuffer *pBuffer, const DWORD numberOfBytes) const =0
 Dispatch a buffer and a handler to the pool.
virtual void AssociateDevice (HANDLE hDevice, IHandler &handler) const =0
 Associate a HANDLE with a handler. I/O completion packets that the HANDLE generates will be handled by the handler.
virtual bool ThreadIsInPool () const =0
 Returns true if the calling thread is a member of the thread I/O thread pool. The I/O pool uses a TLS slot to store a, non-zero, identifier for all the threads that make up the pool. Some I/O operations can be performed more efficiently if done on a thread that is known to be part of the I/O pool.
virtual DWORD GetPoolThreadsTlsIndex () const =0
 Obtain the TLS index that the I/O pool uses to store the identifier that is used to determine if a thread is in the pool. This can be used to allow a thread that wasn't created by the I/O pool itself to 'join' the group of threads that are considered to be part of the pool. Use with care...
virtual ThreadIdentifier GetPoolThreadsIdentifier () const =0
 Obtain the identifier that the I/O pool uses to determine if a thread is in the pool. This can be used to allow a thread that wasn't created by the I/O pool itself to 'join' the group of threads that are considered to be part of the pool. Use with care...

Protected Member Functions

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

Member Typedef Documentation

typedef size_t ThreadIdentifier


Constructor & Destructor Documentation

~IIOPool (  )  [inline, protected]

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


Member Function Documentation

virtual void Dispatch ( IHandler handler,
IBuffer pBuffer,
const DWORD  numberOfBytes 
) const [pure virtual]

Dispatch a buffer and a handler to the pool.

Implemented in CIOPool.

virtual void AssociateDevice ( HANDLE  hDevice,
IHandler handler 
) const [pure virtual]

Associate a HANDLE with a handler. I/O completion packets that the HANDLE generates will be handled by the handler.

Implemented in CIOPool.

virtual bool ThreadIsInPool (  )  const [pure virtual]

Returns true if the calling thread is a member of the thread I/O thread pool. The I/O pool uses a TLS slot to store a, non-zero, identifier for all the threads that make up the pool. Some I/O operations can be performed more efficiently if done on a thread that is known to be part of the I/O pool.

Implemented in CIOPool.

virtual DWORD GetPoolThreadsTlsIndex (  )  const [pure virtual]

Obtain the TLS index that the I/O pool uses to store the identifier that is used to determine if a thread is in the pool. This can be used to allow a thread that wasn't created by the I/O pool itself to 'join' the group of threads that are considered to be part of the pool. Use with care...

Implemented in CIOPool.

virtual ThreadIdentifier GetPoolThreadsIdentifier (  )  const [pure virtual]

Obtain the identifier that the I/O pool uses to determine if a thread is in the pool. This can be used to allow a thread that wasn't created by the I/O pool itself to 'join' the group of threads that are considered to be part of the pool. Use with care...

Implemented in CIOPool.


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