5 ms·
While I agree it's poor form to reuse the word 'select' for obvious reasons, there are few circumstances where it makes sense to use the select() interface in a
by newnewpdro 7y ago
While I agree it's poor form to reuse the word 'select' for obvious reasons, there are few circumstances where it makes sense to use the select() interface in any new programs.
It's a very common source of hidden bugs thanks to FD_SETSIZE.
- kazinator 7y agoIt also performs badly due to to all the bitmask twiddling, and copying of those bitmasks to the kernel and back. If you want to select on file descriptor 1000, the bitmask has to include zeros for descriptors 0 through 999. Those get copied to the kernel and iterated over dutifully.