STINNER Victor <victor.stin...@haypocalc.com> added the comment: I think that you don't use Py_BEGIN_ALLOW_THREADS / Py_END_ALLOW_THREADS correctly: the GIL can be released when the hashlib lock is acquired (to run hash functions in parallel threads). So the macros should be:
#define ENTER_HASHLIB \ PyThread_acquire_lock(self->lock, 1); \ Py_BEGIN_ALLOW_THREADS #define LEAVE_HASHLIB \ Py_END_ALLOW_THREADS \ PyThread_release_lock(self->lock); If I'm right, issue #4738 (zlib) is also affected. ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4751> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com