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 pitrou
Recipients donmez, jnoller, mark.dickinson, pitrou
Date 2008-08-18.16:12:31
SpamBayes Score 4.2625384e-06
Marked as misclassified No
Message-id <1219075953.43.0.537362383743.issue3578@psf.upfronthosting.co.za>
In-reply-to
Content
Mmmh, the problem with the list(X.items()) idiom is that it's
thread-safe only if X.items() is implemented in C. Otherwise X can be
mutated if there is a thread-switch while executing bytecode in X.items().

In weakref.py (line 103), by replacing:
    for key, wr in self.data.items():
with:
    for key, wr in list(self.data.items()):

This particular error should disappear.

But this doesn't say why the dictionary is mutated at all. Does
multiprocessing (or at least that particular test) launch several
threads in a given process? Otherwise there may be something fishy going on.
History
Date User Action Args
2008-08-18 16:12:33pitrousetrecipients: + pitrou, mark.dickinson, donmez, jnoller
2008-08-18 16:12:33pitrousetmessageid: <1219075953.43.0.537362383743.issue3578@psf.upfronthosting.co.za>
2008-08-18 16:12:32pitroulinkissue3578 messages
2008-08-18 16:12:32pitroucreate