Serhiy Storchaka added the comment:
Here is simpler reproducer for Python 3. One thread updates WeakValueDictionary
in a loop, other threads runs garbage collecting in a loop. Values are
collected asynchronously and this can cause removing new value by old key.
Following patch fixes this example (or at least makes race condition much less
likely). But it doesn't fix the entire issue. If add list(d) after setting a
new value, the example fails again.
Added file: http://bugs.python.org/file45082/issue28427.py
Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list