You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Mladen Turk <mt...@apache.org> on 2007/11/19 12:34:40 UTC

Purpose of apr_pollset_t in file and socket (Win32)

Hi,

Just wondering what is the purpose of allocated
apr_pollset_t structure in file and socket.

IMHO those are total waste of memory cause they are
never referenced later.

For example, alloc_socket creates a apr_pollset on
each accept or socket create thus allocating memory for one descriptor.
The apr_socket_t pollset struct member is never used neither there
is an API to access it.
The same applies to the apr_file_t for file and pipe operations

Any clue about that? Why do we have apr_pollset_create call for
each of those objects?

IIUC it is referenced only on unix in
apr_wait_for_io_or_timeout function where creation is compile time
defined via WAITIO_USES_POLL, but newer on windows.

Regards,
Mladen