Skip to content

Commit

Permalink
Update _tqdm.py
Browse files Browse the repository at this point in the history
  • Loading branch information
elsonidoq authored and casperdcl committed Jan 20, 2017
1 parent 416c662 commit 64f5e73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tqdm/_tqdm.py
Expand Up @@ -100,7 +100,9 @@ def run(self):
# Then monitor!
cur_t = self._time()
# Check for each tqdm instance if one is waiting too long to print
for instance in self.tqdm_cls._instances:
# Note: self.tqdm_cls._instances set is copied to avoid a RuntimeError
# if it changes it's size during the for
for instance in self.tqdm_cls._instances.copy():
# Only if mininterval > 1 (else iterations are just slow)
# and last refresh was longer than maxinterval in this instance
if instance.miniters > 1 and \
Expand Down

0 comments on commit 64f5e73

Please sign in to comment.