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:

Python tracker <>
Python-bugs-list mailing list

Reply via email to