[issue4751] Patch for better thread support in hashlib
ebfe
report at bugs.python.org
Sat Jan 3 13:28:53 CET 2009
ebfe <knabberknusperhaus at yahoo.de> added the comment:
Haypo, we can probably reduce overhead by defining ENTER_HASHLIB like this:
#define ENTER_HASHLIB(obj) \
if ((obj)->lock) { \
if (!PyThread_acquire_lock((obj)->lock, 0)) { \
Py_BEGIN_ALLOW_THREADS \
PyThread_acquire_lock((obj)->lock, 1); \
Py_END_ALLOW_THREADS \
} \
}
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4751>
_______________________________________
More information about the Python-bugs-list
mailing list