Wait only 1 second for thread to finish.