How to force thread-pool to increase number of threads...

jbarker4682jbarker4682 USMember ✭✭

I'm trying to figure out a way to make the ThreadPool automatically create a handful of idle threads during application start-up, so that there are no delays when I start some tasks later on in the process. Right now I'm seeing a small delay (maybe half a second) between when I start my first task and when it actually runs, and it looks like this is due to overhead caused by new thread creation.

I looked at ThreadPool.SetMinThreads(), but from what I've read, this only tells the ThreadPool the minimum number of threads it should maintain. It does not actually create any threads if the current thread count is below the minimum.

Any ideas / thoughts / suggestions would be greatly appreciated.

Thanks!

Best Answer

Answers

Sign In or Register to comment.