apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bri...@apache.org>
Subject [Request for comments] new poll API
Date Sat, 27 Jul 2002 02:50:55 GMT
To continue the recent discussions on the problems in the current
apr_poll API, here's a patch for apr_poll.h that illustrates my
proposed fix.

What I'm proposing here is to split the API into two parts:

  - A lightweight, single-function poll API for use (only!)
    with very small sets of descriptors.  This is basically
    the current implementation, but with a limit on the number
    of descriptors that it will accept.  With this limit, we
    can put the temporary pollfd array on the stack in apr_poll()
    to eliminate the memory leak.

  - A general-purpose poll API for larger sets of descriptors.
    This one is an abstract data type, accessible only through
    functions, so that we can do internal optimizations in the
    future (like replacing poll with /dev/poll on supported
    platforms).

Comments welcome...

Thanks,
Brian



Mime
View raw message