Skip to content

Conversation

ngoldbaum
Copy link
Contributor

@ngoldbaum ngoldbaum commented Sep 23, 2025

This is towards fully supporting the free-threaded build. I'm hoping this helps assuage the uncertainty described in c.f. #276 (review).

I think just documenting that the library is thread-unsafe is a minimal possible approach for supporting the free-threaded build. In this PR I implement that and document the limitations of sharing (de)compression contexts between threads, elaborating on the content that's already there for the GIL-enabled build.

In principle we can probably turn possible seg faults for not heeding these warnings into runtime exceptions, but I don't think that changes the content of what I'm proposing here much, so I thought I'd propose this first.

@ngoldbaum
Copy link
Contributor Author

@indygreg gentle ping on this - also if you're interested in further work along these lines I can look at ways to avoid segfaults without introducing runtime overhead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant