0

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 )

  1. 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 ?

  2. 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 ) ?

Yanshof
  • 9,659
  • 21
  • 95
  • 195
  • This would probably answer your question as well http://stackoverflow.com/questions/3447384/does-threadpool-get-shared-between-application-domains – Adil Jun 02 '12 at 06:29
  • thanls, but what about different CLR's ? – Yanshof Jun 02 '12 at 06:36
  • Different version of CLR uses different thread pool! Does that you wanted to ask? – Adil Jun 02 '12 at 06:48

1 Answers1

3

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.

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900