If I use the ThreadPool in a nested way, my application hangs:
ThreadPool.QueueUserWorkItem((state) =>
ThreadPool.QueueUserWorkItem(Action));
While the Windows API allows for multiple Thread Pools in a process, .NET does not directly expose this. In the .NET Framework..
There is Exactly One .NET ThreadPool per .NET AppDomain, and absolutely no way to change this.
So with different application domains.. it is possible to have different .NET ThreadPools within the same process.
(NOTE: The heuristics for the Hill Climb algorithm used in .NET is also determined on a per-.NET ThreadPool basis. This, along without being able to specify a maximum number of workers per type, is a downside of a 'global per appdomain' ThreadPool with varied workloads.)