Uh oh!
There was an error while loading. Please reload this page.
gh-124397: Add free-threading support for iterators. - #148894
Conversation
21fca13 to
4c2bad0CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Documentation build overview
69 files changed · |
vstinner
commented
Apr 29, 2026
I concur with @ZeroIntensity who wrote that For example, I would expect importthreadingclassDemo:
_next_id=0@threading.synchronizeddefget_id(self):
self._next_id+=1returnself._next_idBut calling get_id() fails with:
|
rhettinger
commented
Apr 30, 2026
Here are some GRASP-like thoughts on which module these should go into. These are only useful in the context of multithreaded programs. The threading module is where people look for tools to manage and synchronize concurrency conflicts. The implementation of the tools is almost entirely about lock management and synchronized result buffering. There is almost no logic that isn't threading related. In contrast, the itertools module is scoped to only include general purpose tools for creating iterators. Nothing in it has any thread management. Most of the tools are roughly equivalent to just a plain generator. |
I'd be able to live with these existing under If we're going to keep these under |
ZeroIntensity
left a comment
There was a problem hiding this comment.
Thanks for humoring me.
@vstinner, are you comfortable with this living under threading, as long as "iterator" is in the name?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ZeroIntensity
left a comment
There was a problem hiding this comment.
LGTM, thank you!
The failing CI is due to a Ubuntu outage.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
📚 Documentation preview 📚: https://cpython-previews--148894.org.readthedocs.build/