Q:

Finish thread inside of it

I'm developing a motion detection app, where I have a Thread that compares continously the screen frames for if there is movement, and if it is, it takes a capture and saves it.
Now I need to modify this, I need to do it just one time. After detecting movement, I need to start another method which will process some actions, but I no longer need the motionDetection thread, and due to some issues with it while I execute the new method, I would need to stop it and get out of it. 
So, what would be the correct way to finish the thread when I start this new method?

A:

Just return from the first thread, once you are done detecting the movement.

