[issue24482] itertools.tee causes segfault in a multithreading environment, while the equivalent implementation doesn't

Dmitry Odzerikho report at bugs.python.org
Sun Jun 21 12:59:20 CEST 2015


New submission from Dmitry Odzerikho:

Hi,

I'm using iterators returned by itertools.tee in different threads. The original iterator passed to itertools.tee is thread-safe, however, it doesn't guarantees that the cloned iterators are thread safe too. However the equivalent implementation of itertools.tee in pure Python seems to work fine in this case. Is it expected or I'm doing something wrong?

I'm attaching a simple example that shows the behaviour.

----------
title: itertools.tee causes segfault in a multithreading environment, while the equivalent implementation does'nt -> itertools.tee causes segfault in a multithreading environment, while the equivalent implementation doesn't
Added file: http://bugs.python.org/file39756/test_segfault.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24482>
_______________________________________


More information about the Python-bugs-list mailing list