apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject apr_pollset, modifying reqevents
Date Tue, 27 Jun 2006 11:25:45 GMT

I propose a new function apr_poll_modify, or
modifying apr_poll_add to be able to change
the interest ops/events for a designated apr_pollfd_t.

The point is to have an option to modify the
request events (poll options) without the need
to remove/add the same socket with different reqevents.

For example initially the socket might be
registered with APR_POLLIN, and then later after
the pollset_poll call it might be registered as
APR_POLLOUT without the need for remove/add.

It can be done two ways:

1. By using existing apr_pollset_add and depending
    if the apr_pollfd_t is already member of the
    pollset or not, execute real add or modify.
    This would allow possibility to be backported.

2. Adding a new function apr_pollset_modify.

I would prefer the first way, because it mean
'add' or 'add with different reqevents'.
The only drawback I can see is that it would
disallow to have a apr_pollfd_t added multiple
times to the pollset (BTW I think that we wish
to disable that anyhow by looking at the select.c
where we explicitly search for duplicate fd's on

Any comments?


View raw message