[issue1164] tp_print slots don't release the GIL

Guido van Rossum report at bugs.python.org
Sun Sep 16 04:19:01 CEST 2007


Guido van Rossum added the comment:

Looks Good, except I think it's a bad idea to release/acquire the GIL
for each character when writing the repr() of a string.  Given that the
string is immutable and its refcount kept alive by the caller I don't
see a reason why you can't just reference the object without holding the
GIL.  (Also you might want to copy the size into a local variable, it
won't change...)

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1164>
__________________________________


More information about the Python-bugs-list mailing list