For the 'simple' sort of thing you appear to want to do, have you thought of using a BackgroundWorker ? with BackgroundWorker, you can signal it to be cancelled, and check 'CancellationPending' in the processing loop .. obviously you can put this together yourself, but 'bgw' sets it all up nicely and there are oodles of examples existing
[edit] as Kenneth points out below by including the link to an article, Task.Run() is 'the new BackgroundWorker' ..
Task.Run vs BackgroundWorker: Conclusion[
^] [/edit]