I'd like to make a simple thread pool (on a *nix system) to handle input on my asynchronous communication server. And I have some questions. At first I just want to have a static number of threads, arbitrarily say 6.
How should I send the command to the worker thread?
I was thinking of using simple socket communication, with something like this
main thread:: send [(recv) socket (send) otherSocket];
then have my threads simply block on the receive call, is this horribly inefficient?
Is there a library I should use? Are there better implementation methods?
(later I am going to make the threads dynamic, I just figured it would be easier to start with a set number)