celery / billiard

Multiprocessing Pool Extensions
Other
419 stars 252 forks source link

Thread 'TimeoutHandler' crashes sometimes #248

Closed adamdelman closed 6 years ago

adamdelman commented 6 years ago

When timeouts are enabled, the following exception occurs sporadically:

Thread 'TimeoutHandler' crashed: RuntimeError('dictionary changed size during iteration',) Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/billiard/pool.py", line 478, in run return self.body() File "/usr/local/lib/python3.6/site-packages/billiard/pool.py", line 734, in body for _ in self.handle_timeouts(): File "/usr/local/lib/python3.6/site-packages/billiard/pool.py", line 716, in handle_timeouts for i, job in list(cache.items()): RuntimeError: dictionary changed size during iteration

adamdelman commented 6 years ago

Fixes #248