I have 3 .net process that run on the machine ( no connection between each of the processes )
All of the processes compiled using the same .net version ( lets say .net 4.0 )
-
Does all of the processes using the same threadPool ?
Does threadPool instance is per CLR that run on the machine ? or each of process hold his own threadPool ? -
In case one of the process is compiled using .net 2.0 => is there will be now more threadPool instance ( that will increase the overhead because more threadPool instance will formation of new thread that will appear in this new threadPool ) ?
The ThreadPool is just a managed wrapper around a producer/consumer queue – that will be per AppDomain. It will not be shared between processes. There is usually one AppDomain per process, but even if you create multiple AppDomain instances in a single process, the ThreadPools will be separate. Note, however, that managed and unmanaged threads are not the same thing: how the managed threads get serviced by the unmanaged threads of the process is an implementation detail.