4 ms·
What has replaced select()?
by nix0n 9y ago
What has replaced select()?
- elromulous 9y agoepoll on linux. Other apis on other oses. More reading: http://www.kegel.com/c10k.html http://www.kegel.com/c10k.html
- fish_fan 9y agoKqueue on the bsds and darwin.
- jandrese 9y agoAlthough there is a case for still using select(). If you're looking at avoiding porting headaches and aren't dealing with a large number of descriptors then select() still works fine. The alternatives are mostly necessary when you're dealing with large numbers of connections (thousands), which most people aren't. Of course there's also the slight problem that select()'s interface with the file descriptor packing macros and the unusual requirement to figure out which file descriptor is the largest numerically that might push people to the alternatives. That is also a valid reason IMHO.