Re: [reSIProcate-users] Threading model
- From: Andrew Wood <ajwood@xxxxxxx>
- Date: Wed, 17 Dec 2008 21:05:41 +0000
Thanks Byron,
So is there no way to make it so that the stack uses a thread pool
rather than having one thread doing all the work for all incoming messages?
Byron Campen wrote:
You can have multiple threads calling receive, sure. But, unless
your threads are doing some pretty heavy lifting, having lots of them
won't be all that advantageous (you'll end up with the stack thread
taking up one CPU, and a handful of threads doing very little compared
to the stack thread). Also, if you ever need to correlate an incoming
message with one received previously, having the incoming stuff
randomly scattered across multiple threads will probably not work to
your advantage.
Best regards,
Byron Campen