On Mon, Jul 23, 2001 at 07:50:22PM -0700, Chris Vandomelen wrote : 
> > On Mon, Jul 23, 2001 at 11:57:44PM +0200, Markus Fischer wrote:
> > > On Mon, Jul 23, 2001 at 11:15:49PM +0200, Stig Venaas wrote :
> > > Chris mentioned something that its not needed to restore the last
> > > highest value for the max_fd if you drop the current highest one.
> >
> > I agree, it would only be for efficiency. I think now that the
> > best solution is to just store the max. If clear.. is called
> > with the current max, we can start at max and going downwards
> > we can do FD_ISSET on each number until we find something that
> > is set. Then we have the new max.
> 
> You can store the max, but it's not necessary to decrease it if someone
> does FD_CLR() on a FD in the set. The only negative effect specifying a
> larger value to select() has is extra loops in kernel space.
> 
> >
> > > This makes me wondering why we not ever pass something like
> > > 0xffffffff to select() [of course there is some legal reason not
> > > to do this, i'm just curious now].
> >
> > Maybe, but I don't like it. Are you sure there are may not be bad
> > things happening if the number is outside the size of the set?
> 
> See above.
> 
> BTW, you never specify 0xffffffff to select() anyway.
> 0xffffffff = (int) -1. :)
> 
> >
> > > One the other hand, Daniel [afaik??] suggested to let the user
> > > retrieve the handle id for a socket and calculate the hightest
> > > value on its own. Something like
> > >
> > >   $fd = socket_get_fd( $socket);
> > >
> > > comes into my mind.
> > >
> > >
> > > The first one would be more nice for the users while the later is
> > > much less programming effort :-)
> >
> > Yes, I think we should be nice to the users though (: There's less
> > time wasted by doing it once in C than having many PHP programmers
> > doing it over and over again...
> >
> 
> I can't see why a user would ever need access to the actual file
> descriptor returned.
> 
> > > I'm just wondering if there can be ever any drawback if we don't
> > > let the user specify the first parameter to the select() call.
> > >
> > > As I'm not an expert I can't tell.
> >
> > I'm no expert, but I really can't see why it's needed (:
> >
> 
> Nor do i. :)

Great :-)

So we're seeing this getting implemented soon ?

Volunteers, anyone ? :-))

- Markus

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to