
15 Dec
2005
15 Dec
'05
8:33 p.m.
"Stefan Seefeld" <seefeld@sympatico.ca> wrote in message news:43A1AFF4.1070507@sympatico.ca...
Arkadiy Vertleyb wrote: [snip]
What I did was to have the main thread accept incomming requests, and put them in the queue, whereas a number of worker threads was taking these requests from the queue, and execute them. I don't see how this model can be absolutely inferior in all possible contexts.
That is usually referred to as 'Thread Pool', and it is usually considered the 'best' strategy among the multi-threaded ones, in particular due to its scalability.
Well, this particular concurrency model utilizing thread pool is the simplest but not the best. Ever heard about Leader/Followers pattern?