InfiniTec - Henning Krauses Blog

Don't adjust your mind - it's reality that is malfunctioning

Advanced Thread Pool

Posted under .NET Tools | Comments (0)

Description

The existing threadpool class has several drawbacks:
One example for the latter point is the HttpWebRequest Class, which still goes further and throws an exception when less than two threads are available on the threadpool. (See my article HttpWebRequest fails when several connections are made concurrently).
These drawbacks are evaded with this implementation: Within one process more than one instance can be instantiated and the number of available threads can be adjusted per instances. Additionally, the number of used threads is dynamic, so unused threads will starver over time and will be recreated when load goes up.

Downloads

References

Some of the ideas for this implementation were taken from the CodeProject article Smart Thread Pool by Ami Bar.

Technorati:

Posted by Henning Krause on Sunday, January 2, 2005 12:47 PM, last modified on Sunday, January 2, 2005 1:23 PM
Permalink | Post RSSRSS comment feed