Message71346
| 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:33 | pitrou | set | recipients:
+ pitrou, mark.dickinson, donmez, jnoller |
| 2008年08月18日 16:12:33 | pitrou | set | messageid: <1219075953.43.0.537362383743.issue3578@psf.upfronthosting.co.za> |
| 2008年08月18日 16:12:32 | pitrou | link | issue3578 messages |
| 2008年08月18日 16:12:32 | pitrou | create |
|