Subj : Re: Futexes are wrong! (Are they?) To : comp.programming.threads From : David Schwartz Date : Mon Jun 13 2005 01:18 pm "Jomu" wrote in message news:1118683254.093964.9310@z14g2000cwz.googlegroups.com... >> Just please, name two advantages of thread-per-client. I've named at >> least six advantages of a thread pool. > 1. You don't have to make 10,000 bit bitset for select() call on > 10,000 fd's; If you want simplicity, you can use 'poll' with a thread pool. If you want the highest possible performance, you can use whatever provides the best performance on your OS. > 2. Your kernel does not have to operate on (and nobody claimed it's > been O(1)-ed) 10,000 bit bitset; Same answer. There is some ideal number of connections to 'poll' on. It's probably not one and it's probably not 10,000. With a thread pool, you can have your I/O threads 'poll' on the optimum number of sockets each. Try again. DS .