Read the API doc for the stop() method. Its all there.

The stop() method is depreciated and NOT recommended.
Recommended way is to use a flag to communicate to the thread that it is to exit.