Skip to content

Commit

Permalink
Merge pull request #300 from BQSKit/default_task_pop
Browse files Browse the repository at this point in the history
Fix `KeyError` for already popped tasks
  • Loading branch information
mtweiden authored Nov 1, 2024
2 parents b7917dc + 94a0ef5 commit 14eab3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bqskit/runtime/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def _process_task_completion(self, task: RuntimeTask, result: Any) -> None:
self._conn.send((RuntimeMessage.RESULT, packaged_result))

# Remove task
self._tasks.pop(task.return_address)
self._tasks.pop(task.return_address, None)

# Cancel any open tasks
for mailbox_id in self._active_task.owned_mailboxes:
Expand Down

0 comments on commit 14eab3c

Please sign in to comment.