This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients arigo, fdrake, serhiy.storchaka
Date 2016-10-13.18:22:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1476382958.75.0.0676893732159.issue28427@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-10-13 18:22:38serhiy.storchakasetrecipients: + serhiy.storchaka, fdrake, arigo
2016-10-13 18:22:38serhiy.storchakasetmessageid: <1476382958.75.0.0676893732159.issue28427@psf.upfronthosting.co.za>
2016-10-13 18:22:38serhiy.storchakalinkissue28427 messages
2016-10-13 18:22:38serhiy.storchakacreate