Skip to content

Commit 6bd711c

Browse files
Add docs.
1 parent f2a8d89 commit 6bd711c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/library/itertools.rst

+4
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,10 @@ loops that truncate the stream.
645645
used anywhere else; otherwise, the *iterable* could get advanced without
646646
the tee objects being informed.
647647

648+
``tee`` iterators are not threadsafe. A :exc:`RuntimeError` may be
649+
raised when using simultaneously iterators returned by the same :func:`tee`
650+
call, even if the original *iterable* is threadsafe.
651+
648652
This itertool may require significant auxiliary storage (depending on how
649653
much temporary data needs to be stored). In general, if one iterator uses
650654
most or all of the data before another iterator starts, it is faster to use

0 commit comments

Comments
 (0)