public void Stop () { // Set the flag to stop so that the while in the thread will stop // doing its infinite loop. started = 0; }