block ui thread if needed