Skip to content

Commit a2e9f25

Browse files
committed
add a sleep
1 parent efa767c commit a2e9f25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codeflash/optimization/function_optimizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import ast
44
import concurrent.futures
55
import os
6-
import shutil
76
import subprocess
87
import time
98
import uuid
@@ -405,9 +404,10 @@ def determine_best_candidate(
405404
future_line_profile_results = None
406405
try:
407406
candidate = candidates.popleft()
408-
except IndexError as e:
407+
except IndexError:
409408
if done:
410409
break
410+
time.sleep(0.001) #sleep for 1millisecond
411411
continue
412412
candidate_index += 1
413413
get_run_tmp_file(Path(f"test_return_values_{candidate_index}.bin")).unlink(missing_ok=True)

0 commit comments

Comments
 (0)