[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

Xiang Zhang report at bugs.python.org
Mon Sep 2 11:26:10 EDT 2019


Xiang Zhang <angwerzx at 126.com> added the comment:

>It may be better to apply it even to the developed version. There is nothing wrong with creating the tee iterator in one thread and using it the other thread. Or using the tee iterators with external locking. I afraid that PR 15567 can break a legitimate code.

+1 on this. I think it's better to also apply #15625 to master branch. I don't think we should prevent creating the iterator in one thread and using it in others.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34410>
_______________________________________


More information about the Python-bugs-list mailing list