Skip to content

gh-124397: Add itertools.serialize (name tbd) #133272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eendebakpt
Copy link
Contributor

@eendebakpt eendebakpt commented May 1, 2025

Add itertools.serialize to make a non-threadsafe iterator thread-safe.

  • Bikeshedding on the naming (thread at discuss.python.org)
  • Update documentation
  • Add method to make generator function thread-safe (probably a followup PR)

📚 Documentation preview 📚: https://cpython-previews--133272.org.readthedocs.build/

@rhettinger
Copy link
Contributor

Do you think this belongs in itertools or in threading? I could see a case for either one.

@rhettinger rhettinger removed their request for review May 1, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants