New submission from Armin Rigo: Follow-up on http://bugs.python.org/issue19542.
Another crash of using WeakValueDictionary() in a thread-local fashion inside a multi-threaded program. I must admit I'm not exactly sure why this occurs, but it is definitely showing an issue: two threads independently create their own WeakValueDictionary() and try to set one item in it. The problem I get is that the "assert 42 in d" sometimes fails, even though 42 was set in that WeakValueDictionary on the previous line and the value is still alive. This only occurs if there is a cycle of references involving the value. See attached file. Reproduced on Python 2.7, 3.3, 3.5, 3.6-debug. ---------- files: test.py messages: 278555 nosy: arigo priority: normal severity: normal status: open title: WeakValueDictionary next bug (with multithreading) type: behavior versions: Python 2.7, Python 3.3, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file45072/test.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28427> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com