ACE_Dev_Poll_Ready_Set Class Reference

Class that contains the list of "ready" file descriptors. More...

#include <Dev_Poll_Reactor.h>

List of all members.

Public Member Functions

 ACE_Dev_Poll_Ready_Set (void)
 Constructor.

Public Attributes

struct pollfd * pfds
int nfds
 The number of "ready" file descriptors in the above array.

Detailed Description

Class that contains the list of "ready" file descriptors.

This class points to an array of pollfd structures corresponding to "ready" file descriptors, such as those corresponding to event handlers that request an additional callback after being initially dispatched (i.e. return a value greater than zero).

The idea is to store the "ready" set in an existing area of memory that already contains pollfd instances. Doing so is safe since the "ready" set is dispatched before polling for additional events, thus avoiding being potentially overwritten during the event poll.
When the "ready" set is dispatched, all that needs to be done is to iterate over the contents of the array. There is no need to "walk" the array in search of ready file descriptors since the array by design only contains ready file descriptors. As such, this implementation of a ready set is much more efficient in the presence of a large number of file descriptors in terms of both time and space than the one used in the Select_Reactor, for example.

Constructor & Destructor Documentation

ACE_Dev_Poll_Ready_Set::ACE_Dev_Poll_Ready_Set ( void   ) 

Constructor.


Member Data Documentation

The number of "ready" file descriptors in the above array.

struct pollfd* ACE_Dev_Poll_Ready_Set::pfds [read]

The array containing the pollfd structures corresponding to the "ready" file descriptors.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Mon Nov 30 00:51:51 2009 for ACE by  doxygen 1.6.1