Difference between Thread.Abort() and Thread.Interrupt()?
What is the difference between Abort() and Interrupt() related to Threads?

See All Responses Below...
Author
Message Rating
Posted on: 31/05/2012
I recommend you to avoid these methods, you should write your threads using normal synchronization objects. 

While Thread.Abort() just stop execution thread and don't close thread's handlers like files opened, etc. Thread.Interrupt() basically means "I don't care what you're waiting for, stop waiting for it" 

Posted on: 04/06/2012
I want stop the thread completely and need to free all its resources. What I need to use?
Share this page across other social networking sites



Posted on: 13/06/2012
Sorry for delay,

As you must know, you can terminate a thread using ExitThread() or TerminateThread() from other thread. 
A terminated thread will continue to exist until the last handle to it is closed using
CloseHandle(), so you must careful when are using WaitForSingleObject() and WaitForMultipleObjects() using thread handles.

Remember that terminate a thread through ExitThread() and TerminateThread() set the object to the signaled state, releasing all other threads waiting on the object (including threads).
Please Login to Post Your Comments
Name (Max. 100 characters)
Please post your comments here
Select Language
Comments
Attach File(Max. Size: 2 MB)
A few simple rules when posting your Comments,
  1. Please post only answers relevant to the topic of discussion.
  2. Please dont misuse this site or do not be abusive, offensive, inappropriate,harass anyone on the boards or post ads or spam. Doing so will delete your inappropriate messages and will block or delete your account on this site.