File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -393,7 +393,7 @@ def determine_best_candidate(
393393 try :
394394 candidate_index = 0
395395 original_len = len (candidates )
396- while candidates :
396+ while True :
397397 done = True if future_line_profile_results is None else future_line_profile_results .done ()
398398 if done and (future_line_profile_results is not None ):
399399 line_profile_results = future_line_profile_results .result ()
@@ -512,7 +512,8 @@ def determine_best_candidate(
512512 self .write_code_and_helpers (
513513 self .function_to_optimize_source_code , original_helper_code , self .function_to_optimize .file_path
514514 )
515-
515+ if done and not candidates :
516+ break
516517 except KeyboardInterrupt as e :
517518 self .write_code_and_helpers (
518519 self .function_to_optimize_source_code , original_helper_code , self .function_to_optimize .file_path
You can’t perform that action at this time.
0 commit comments