[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: See also issue #9260 for a possible improvment. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: > for 12 years already (10011) Oops, it's r10011 (to get a nice URL on the commit). -- ___ Python tracker ___

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: > If the import lock is changed to raise an exception, > heaps of multi-threaded software will be broken. You are right. It has done so for 12 years already (10011), so it's a bit late to do anything about it. And backward compatibility is very important, so

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If it is impossible to detect deadlocks, can't we raise an exception > if two threads try to import a module at the same time? (change > completly how the import "lock" is handled) > > Antoine changed recently the io module to raise a RuntimeError on > reentr

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: > > can't we raise a RuntimeError on a deadlock? (I mean: deadlock on the import lock) > Deadlock detection is difficult, and probably impossible if the > involved locks don't use the same underlying mechanism If it is impossible to detect deadlocks, can't we

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-20 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > can't we raise a RuntimeError on a deadlock? Deadlock detection is difficult, and probably impossible if the involved locks don't use the same underlying mechanism. (A lock can be a pthread object, a file opened with os.O_EXCL, and even a loop that te

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-19 Thread STINNER Victor
STINNER Victor added the comment: Dummy question: can't we raise a RuntimeError on a deadlock? -- ___ Python tracker ___ ___ Python-b

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-19 Thread STINNER Victor
Changes by STINNER Victor : -- title: Python 2.7 hangs on Unicode+threading -> Deadlock because of the import lock when loading the utf8 codec ___ Python tracker ___ ___