Re: [PHP4BETA] select() Design Notes

From: Date: Sat, 04 Dec 1999 13:00:18 +0000
Subject: Re: [PHP4BETA] select() Design Notes
References: 1 2  Groups: php.version4 
Request: Send a blank email to php-version4+get-7391@lists.php.net to get a copy of this message
On Sat, Dec 04, 1999 at 05:49:14AM +0100, Christian Schneider wrote: > Evan Klinger wrote: > > and $ret could be: > > a) false // timeout > > b) a single fd-resouce > > c) an array of fp-resources with their status. > > Hmm.. why not mimic the UNIX/C behaviour? > $ret = number of fds (see man select) > and input arrays would be modified to contain fds which caused select() to > return. > > $ret gives you easy way to determine what happened, arrays are easy to examine > as well. If you return an array of fds instead you run into the problem of > marking which fd were readable vs. writeable vs. got an exception. Especially if > you have the same fd in read and write fdset. > > But then again, maybe I'm too used to using select() with C :-) Without looking at the current implementation, I'd like to see a C-like select() as well. IMO it does not make sense to provide a function which has the same name, but other semantics. That will just confuse people who are used to select(2). -- Regards, Sascha Schumann Consultant

« previous php.version4 (#7391) next »