groads2 Posted August 29, 2012 Posted August 29, 2012 We have a service that runs several threads to handle different functions required by the service. One of the functions stops working after several days. I assume the thread no longer exists or is not running. How can I monitor that or tell if a thread no longer exists or is no longer running? Quote
groads2 Posted August 29, 2012 Author Posted August 29, 2012 My solution is to monitor the IsAlive property on the thread every 30 seconds. Seems to give me what I am looking for. Thanks. Quote
Leaders snarfblam Posted August 29, 2012 Leaders Posted August 29, 2012 I think that ideally you would want to figure out why the thread is crashing (unless, of course, you already know what the problem is). Also, what version of .NET are you using? I believe that 1.x deals with unhandled exceptions differently than other versions (failing silently versus taking the whole ship down). If you're not using 1.x and threads are silently disappearing, I'm a bit confused. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.