Importing can sometimes fail in multi-threaded scenarios

Issue #236 resolved
Max Bélanger
created an issue

We've noticed the following exception can occur (rarely) in some scenarios:

Traceback (most recent call last):
  ...
  File "ImageCaptureCore/__init__.py", line 21, in <module>
  File "objc/_lazyimport.py", line 81, in __init__
RuntimeError: dictionary changed size during iteration

This is possible if another thread mutates sys.modules during the for loop in _lazyimport.py.

Comments (4)

  1. Log in to comment