tags:

views:

103

answers:

1

I have an application with 4 worker threads from the thread pool. It was waking up every 0.5 second. as written in msdn the thread pool monitors every 0,5 second to create idle threads. I set the nuber of minimum threads to 4 and it solved the problem - no more background activity all the time. My question is - I have another applicatiopn which has the same number of threads threads-4, but here setting min thread to 4 doesn't help but when setting min thread to 5 then the background monitoring stops. What might be the difference between 2 application with the same number of threads from the thread pool- 4 threads.On one setting min threads to 4 helps and the other only setting min threads to 5 helps?

A: 

Depends on what you're doing with the thread pool.

Remember that the thread pool is not something you want to use for long-running tasks - it's intended for small, quick jobs where the overhead of creating a thread would be significant.

Anon.