[issue7739] time.strftime may hung while trying to open /etc/localtime but does not release GIL

STINNER Victor report at bugs.python.org
Thu Jan 21 02:01:24 CET 2010


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> It appears that the stall happens due to time.strftime call, which internally opens 
> a file ('/etc/localtime')

In the GNU libc, strftime() calls tzset() and tzset() uses a lock to be thread safe. Yes, releasing the GIL before calling strftime() would speed up your use case.

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7739>
_______________________________________


More information about the Python-bugs-list mailing list