Skip to content

gh-116738: Make zlib module thread-safe - #142432

Merged
colesbury merged 3 commits into
python:mainfrom
yoney:ft_zlib
Dec 12, 2025
Merged

gh-116738: Make zlib module thread-safe#142432
colesbury merged 3 commits into
python:mainfrom
yoney:ft_zlib

Conversation

@yoney

@yoney yoney commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

Makes the zlib module thread-safe free-threading build. Even though operations are protected by locks, attributes exposed via PyMemberDef (eof, needs_input, unused_data, unconsumed_tail) should still be stored atomically within locked sections, since they can be read without acquiring the lock.

cc: @mpage @colesbury

@yoney
yoney marked this pull request as ready for review December 8, 2025 22:57
@colesbury
colesbury requested review from colesbury and mpage December 9, 2025 18:01
Comment thread Modules/zlibmodule.c Outdated
Comment thread Modules/zlibmodule.c
Comment thread Modules/zlibmodule.c
@colesbury
colesbury merged commit 1eddef8 into python:main Dec 12, 2025
50 checks passed
@yoney
yoney deleted the ft_zlib branch January 27, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants