I have an app with the following basic architecture:
A windows service (Service) that registers a .NET type (RemoteObject) for remote access (.NET Remoting). RemoteObject creates non-ThreadPool threads that use the ThreadPool to do IO processing. The size of the ThreadPool must be restricted to a limit for a particular reason. A GUI app uses .NET Remoting to access RemoteObject.
I’ve noticed that if the size of the ThreadPool is too low, the GUI app will hang when making a call to RemoteObject.
My question is, how can I figure out why this is hanging, and why would the RemoteObject thread be affected by the ThreadPool?
This is driving me crazy; thank you for your help!
It turns out that the .NET remoting infrastructure uses the .NET ThreadPool (or shares the underlying resource), so remoting calls can hang if all ThreadPool threads are in use by your app.