Tech Off Post

Single Post Permalink

View Thread: More Advanced ThreadPool
  • User profile image

    pathfinder wrote:

    I've seen thread pool go from 100 threads to 2 threads in a matter of minutes and never get back up in number again.  With regular threads you are guaranteed that all 100 are running always.

    100 running threads is a perf nightmare. Ideally you want the number of running threads to equal the number of logical processors and for those threads never to block. A certain amount of blocking is probably inevitable (unless you write hardcore fiber code) so in those cases you want to aim to have just enough threads to keep processor utilisation near 100% .