A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-October/074982.html below:

[Python-Dev] Deadlock by a second import in a thread

[Python-Dev] Deadlock by a second import in a thread [Python-Dev] Deadlock by a second import in a threadFacundo Batista facundobatista at gmail.com
Sat Oct 20 16:22:34 CEST 2007
2007/10/20, Nick Coghlan <ncoghlan at gmail.com>:

> 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).

Agreed.

But if we move the import of the _strptime module to do it once when
"time" is imported, we enhance the "least surprise" situation (and has
a marginal performance benefit of not trying to import it again every
time.strptime() call).

And even solves this bug, which does not hurt enaybody, ;)

Regards,

-- 
.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4