Multithreading

Here is a comment (and the whole topic) which you might find useful: How to kill thread? - #8 by pbayer

In my opinion, the task approach is the way to go.