Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Use set.update instead of a loop over set.add
Browse files Browse the repository at this point in the history
Co-authored-by: Patrick Cloke <[email protected]>
  • Loading branch information
David Robertson and clokep authored Nov 8, 2023
1 parent 4899623 commit e3a6358
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions synapse/storage/util/id_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,7 @@ def _mark_ids_as_finished(self, next_ids: List[int]) -> None:

with self._lock:
self._unfinished_ids.difference_update(next_ids)
for next_id in next_ids:
self._finished_ids.add(next_id)
self._finished_ids.update(next_ids)

new_cur: Optional[int] = None

Expand Down

0 comments on commit e3a6358

Please sign in to comment.