Staging
v0.5.1
https://github.com/python/cpython
Revision b15bdf7f7a736f49f783ab75904e6b2438449743 authored by Amaury Forgeot d'Arc on 01 July 2008, 20:59:49 UTC, committed by Amaury Forgeot d'Arc on 01 July 2008, 20:59:49 UTC
When a thread touches such an object for the first time, a new thread-local __dict__ is created,
and the __init__ method is run.
But a thread switch can occur here; if the other thread touches the same object, it installs another
__dict__; when the first thread resumes, it updates the dictionary of the second...

This is the deep cause of the failures in test_multiprocessing involving "managers" objects.

Backport of r64601.
1 parent ceda6a6
History
Tip revision: b15bdf7f7a736f49f783ab75904e6b2438449743 authored by Amaury Forgeot d'Arc on 01 July 2008, 20:59:49 UTC
#Issue3088 in-progress: Race condition with instances of classes derived from threading.local:
Tip revision: b15bdf7
File Mode Size
Python.asdl -rw-r--r-- 4.2 KB
acceler.c -rw-r--r-- 2.8 KB
asdl.py -rw-r--r-- 11.0 KB
asdl_c.py -rwxr-xr-x 25.2 KB
bitset.c -rw-r--r-- 977 bytes
firstsets.c -rw-r--r-- 2.2 KB
grammar.c -rw-r--r-- 5.4 KB
grammar.mak -rw-r--r-- 1.3 KB
grammar1.c -rw-r--r-- 1.0 KB
intrcheck.c -rw-r--r-- 2.4 KB
listnode.c -rw-r--r-- 983 bytes
metagrammar.c -rw-r--r-- 2.2 KB
myreadline.c -rw-r--r-- 5.4 KB
node.c -rw-r--r-- 3.6 KB
parser.c -rw-r--r-- 9.6 KB
parser.h -rw-r--r-- 1.0 KB
parsetok.c -rw-r--r-- 6.4 KB
pgen.c -rw-r--r-- 14.7 KB
pgenmain.c -rw-r--r-- 3.3 KB
printgrammar.c -rw-r--r-- 2.4 KB
spark.py -rw-r--r-- 26.3 KB
tokenizer.c -rw-r--r-- 34.8 KB
tokenizer.h -rw-r--r-- 2.4 KB
tokenizer_pgen.c -rw-r--r-- 36 bytes

back to top