Use break to exit all threads