Added time limit to threads during synchronous flush