Possible Duplicate:
Killing a thread (C#)
I have a program that when started will spawn off a thread, the threads main process execute a few method calls that are rather meaty.
The parent class that spawned the thread needs to be able to set the thread as aborted (or stopped), and the thread needs to gracefully stop and clean up/revert changes it's made.
Is there a nice way to abort/stop a thread other than setting a volatile bool and checking if it has been set in the spawned off thread's process? The thread's process calls many methods and could take hours so checking in every single method call is a bit tedious.
I am not stuck to any particular Threading implementation so am up for suggestions