in reply to threadpools and tcp connections

See Simple threaded chat server. The sweet things about threads, is that all threads can share the same filehandles thru the fileno, which can be passed thru shared variables.

So... you can have your main thread do the accept on the connections, and hand them off to a set of threads, by passing the fileno to it. See where the thread itself can remove itself from a select list at the comment #remove multi-echo-clients from echo list.

But yes, it all basically works good together, threads and tcp.


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh