select() Design Notes

From: Date: Sat, 04 Dec 1999 04:04:41 +0000
Subject: select() Design Notes
Groups: php.dev php.version4 
Request: Send a blank email to php-dev+get-13430@lists.php.net to get a copy of this message
I am rewriting select() to be more compact and global-free and I would like the input of the other developers and users. Below is the original design notes posting from Thies. -- evan, i think having a single select() call would be far better. introducing new code that stores stuff in global-variables is not that nice IMO. why can't it just be (and not have an fd_set(), fd_isset() call): $ret = select($timeout,$r_fds[, $w_fds][, $e_fds]); whereby each $?_fds can be a) a singe fd-resource b) an array of a) and $ret could be: a) false // timeout b) a single fd-resouce c) an array of fp-resources with their status. or something similar - but again, i don't think that we should have new global variables in out c-code for this. tc -- Everything has been implemented except for (c). I am not sure if this is the best way but I'm having trouble coming up with something better. The reason I say this is because do you make the return value an associative array or an index array? If it's an associative array then what is the key? Same for an index array - what is the index? If you have r_fds of 2, 3, 4 and 6 would you put them in an index array starting at 0? Any suggestions or pointers would be greatly appreciated. I hope this is clear and concise for everyone; if not, let me know and I will clear anything up. -- ev ---------------------------- Evan Klinger evan@php.net AIM evan715

« previous php.dev (#13430) next »