public void Quit() { // Ask the thread to quit itself if it is running quit_thyself = true; state_change = true; }