Joe Orton wrote:
On Tue, Feb 20, 2007 at 09:02:41AM -0800, Paul Querna wrote:
Paul Querna wrote:
...
- the size parameter to _create() is documented to constrain the
  number of descriptors "returned" by _poll(), but that function
  doesn't really return descriptors.

Righto, it is the maximum number of events that can be handled by a single call to _poll(); It is not actually the maximum number of descriptors.

- relatedly; _add() does not enforce the number of descriptors added
  to "nalloc", nor dynamically grow the pollset; _poll() will crash
  and burn if the user adds too many descriptors - is that
  intentional?

Nope, There is no need to dynamically grow the pollset -- The internals of the apr_pollcb_t structure do not track the descriptors. Both KQueue and EPoll require an array of (kevent|epoll_event) structures to be passed in. In a single call to the OS event function, they will only return up to nalloc events at a time -- There could be more waiting, or only 1 returned.

Reply via email to