[Python-Dev] Deadlock by a second import in a thread
Nick Coghlan
ncoghlan at gmail.com
Sat Oct 20 06:11:57 CEST 2007
Facundo Batista wrote:
> Hi!
>
> I was looking to this bug: http://bugs.python.org/issue1255
>
> It basically creates a deadlock in Python by doing the following:
>
> - aa.py imports bb.py
> - bb.py imports time and generates a thread
bb.py is broken - importing a module should never spawn a new thread as
a side effect (precisely because it will deadlock if the spawned thread
tries to do an import, which can happen in a myriad of ways).
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
More information about the Python-Dev
mailing list