Skip to content

Commit

Permalink
cache.py: Avoid dict changed size during iteration
Browse files Browse the repository at this point in the history
Subset of internetarchive#4330

This code is ___only used in testing___ but it raises a RuntimeError on Apple Silicon M1 Macs.

See internetarchive#4330 Screenshots, problem 4 for details.
  • Loading branch information
cclauss authored and Sabreen-Parveen committed Feb 15, 2021
1 parent 1188941 commit f31ecdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openlibrary/core/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def join_threads(self):
Used only in testing.
"""
for name, thread in self.active_threads.items():
for name, thread in list(self.active_threads.items()):
thread.join()

def encode_args(self, args, kw=None):
Expand Down

0 comments on commit f31ecdb

Please sign in to comment.