summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2021-04-12 05:46:53 (GMT)
committerGitHub <noreply@github.com>2021-04-12 05:46:53 (GMT)
commitcc2ffcdfd78df3a18edae60df81b2f1b044b1634 (patch)
tree0b93072493e3767357def749f92241822be543c9 /Misc
parent553ee2781a37ac9d2068da3e1325a780ca79e21e (diff)
downloadcpython-cc2ffcdfd78df3a18edae60df81b2f1b044b1634.zip
cpython-cc2ffcdfd78df3a18edae60df81b2f1b044b1634.tar.gz
cpython-cc2ffcdfd78df3a18edae60df81b2f1b044b1634.tar.bz2
bpo-43785: Improve BZ2File performance by removing RLock (GH-25299)
Remove `RLock` from `BZ2File`. It makes `BZ2File` to thread unsafe, but gzip and lzma don't use it too. Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2021-04-09-14-51-58.bpo-43785.1mM5xE.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2021-04-09-14-51-58.bpo-43785.1mM5xE.rst b/Misc/NEWS.d/next/Library/2021-04-09-14-51-58.bpo-43785.1mM5xE.rst
new file mode 100644
index 0000000..b4ed5e5
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2021-04-09-14-51-58.bpo-43785.1mM5xE.rst
@@ -0,0 +1,4 @@
+Improve ``bz2.BZ2File`` performance by removing the RLock from BZ2File.
+This makes BZ2File thread unsafe in the face of multiple simultaneous
+readers or writers, just like its equivalent classes in :mod:`gzip` and
+:mod:`lzma` have always been. Patch by Inada Naoki.