summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-01-08 21:17:16 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-01-08 21:17:16 (GMT)
commitbcd5cbe01ef4306a82f85d0500f9a9f04113f804 (patch)
treea9753988bcb56f924a12dac12dc09ad5e54b3119 /Doc/library
parent5bad41eefc9f80298bb1abe00a5475be8b015c57 (diff)
downloadcpython-bcd5cbe01ef4306a82f85d0500f9a9f04113f804.zip
cpython-bcd5cbe01ef4306a82f85d0500f9a9f04113f804.tar.gz
cpython-bcd5cbe01ef4306a82f85d0500f9a9f04113f804.tar.bz2
Issue #4751: hashlib now releases the GIL when hashing large buffers
(with a hardwired threshold of 2048 bytes), allowing better parallelization on multi-CPU systems. Contributed by Lukas Lueg (ebfe) and Victor Stinner.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/hashlib.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst
index ad2bfa5..7a65d7d 100644
--- a/Doc/library/hashlib.rst
+++ b/Doc/library/hashlib.rst
@@ -37,6 +37,11 @@ concatenation of the data fed to it so far using the :meth:`digest` or
.. note::
+ For better multithreading performance, the Python GIL is released for
+ strings of more than 2047 bytes at object creation or on update.
+
+.. note::
+
Feeding string objects is to :meth:`update` is not supported, as hashes work
on bytes, not on characters.