➜

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.

作者 pitrou
收信人 donmez, jnoller, mark.dickinson, pitrou
日期 2008-08-18.16:12:31
SpamBayes Score 4.2625384e-06
Marked as misclassified 否
Message-id <1219075953.43.0.537362383743.issue3578@psf.upfronthosting.co.za>
In-reply-to
内容
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.
历史
日期 用户 动作 参数
2008-08-18 16:12:33pitrou修改recipients: + pitrou, mark.dickinson, donmez, jnoller
2008-08-18 16:12:33pitrou修改messageid: <1219075953.43.0.537362383743.issue3578@psf.upfronthosting.co.za>
2008-08-18 16:12:32pitrou链接issue3578 messages
2008-08-18 16:12:32pitrou创建