In C# ,how do I terminate a thread that has had its call stack corrupted?

Posted by Emil D on Stack Overflow See other posts from Stack Overflow or by Emil D
Published on 2010-03-15T19:34:00Z Indexed on 2010/03/15 19:39 UTC
Read the original article Hit count: 179

Filed under:
|

I have a thread in my application that is running code that can potentially cause call stack corruption ( my application is a testing tool for dlls ). Assuming that I have a method of detecting if the child thread is misbehaving, how would I terminate it? From what I read, calling Thread.Abort() on the misbehaving thread would be equivalent to raising an exception inside it.I fear that that not be a good idea, provided the call stack of the thread might be corrupted.Any suggestions?

© Stack Overflow or respective owner

Related posts about c#

Related posts about threading