Timeout successfully exits both  threads