[docs] [issue19160] Inconsistent size for GIL release in hashlib

Jesús Cea Avión report at bugs.python.org
Fri Oct 4 04:12:49 CEST 2013


Jesús Cea Avión added the comment:

For extra safety, I just checked the source of 3.4:

"""
#define HASHLIB_GIL_MINSIZE 2048

[...]

if (self->lock == NULL && view.len >= HASHLIB_GIL_MINSIZE) {

[...]

if (view.len >= HASHLIB_GIL_MINSIZE) {

[...]

if (len >= HASHLIB_GIL_MINSIZE) {
"""

So, yes, the GIL is released if len >= 2048 bytes.

BTW, in Python 3.x hashes can't be calculated on strings, but bytes.

I take care of this. Commit in 5 minutes.

----------
assignee: docs at python -> jcea

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


More information about the docs mailing list