Skip to content

Commit 84e0159

Browse files
authored
Add files via upload
1 parent c80d1c1 commit 84e0159

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

multioptpy/Wrapper/mapper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2566,6 +2566,7 @@ def _run_batch_parallel(
25662566
# When set, TimeoutError is raised once the deadline is exceeded.
25672567
try:
25682568
for future in as_completed(futures_map, timeout=self.worker_timeout_s):
2569+
handled_futures.add(future)
25692570
task, run_dir, iteration, gamma_sign, atom_i, atom_j = (
25702571
futures_map[future]
25712572
)
@@ -2621,7 +2622,7 @@ def _run_batch_parallel(
26212622
# _process_single_result / release() to be silently skipped,
26222623
# leaving the key permanently stuck in _in_flight.
26232624
for future, meta in futures_map.items():
2624-
if future in cancelled_futures:
2625+
if future in cancelled_futures or future in handled_futures:
26252626
continue # release() already called in Step 1
26262627
task, run_dir, iteration, gamma_sign, atom_i, atom_j = meta
26272628
killed_futures.add(future)

0 commit comments

Comments
 (0)