I'm working on an application where the user can start a "task" that spawns on a separate thread.
The user is very likely to start this task and then restart it several times with slightly different parameters each time.
I could use Thread.Abort
, or I could rewrite the code in the task so that there are numerous points where the task checks if the user wants to restart it.
Should Thread.Abort
only be used in exceptional circumstances, or is it acceptable for this sort of thing?