title: Is using Thread.Abort() and handling ThreadAbortException in .NET safe practice?
body: <p>I need to develop a multithreaded Azure worker role in C# - create multiple threads, feed requests to them, each request might require some very long time to process (not my code - I'll call a COM object to do actual work).</p>
  
  <p>Upon role shutdown I need to gracefully stop processing. How do I do that? Looks like if I just call <code>Thread.Abort()</code> the <code>ThreadAbortException</code> is thrown in the thread and the thread can even use <code>try-catch-finally</code> (or <code>using</code>) to clean up resources. This looks quite reliable.</p>
  
  <p>What bothers me is that my experience is mostly C++ and it's impossible to gracefully abort a thread in an unmanaged application - it will just stop without any further processing and this might leave data in inconsistent state. So I'm kind of paranoid about whether anything like that happens in case I call <code>Thread.Abort()</code> for a busy thread.</p>
  
  <p>Is it safe practice to use <code>Thread.Abort()</code> together with handling <code>ThreadAbortException</code>? What should I be aware of if I do that?</p>