Armin Rigo added the comment: issue28427-atomic.patch: is it still necessary to modify weakref.py so much, then?
What I had in mind was a C function with Python signature "del_if_equal(dict, key, value)"; the C function doesn't need to know about weakrefs and checking if they are dead. The C function would simply call PyObject_GetItem() and PyObject_DelItem()---without releasing the GIL in the middle. ---------- _______________________________________ 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