<div dir="ltr"><div dir="ltr">Alex Otenko <<a href="mailto:oleksandr.otenko@gmail.com">oleksandr.otenko@gmail.com</a>> ezt írta (időpont: 2023. júl. 3., H, 11:41):<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">It should really be channels, not queues. So that either end can close it. That can also solve the problem that you raise about generators being stuck in the scheduler forever. </div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br></blockquote></div></blockquote><div><br></div><div>That is only enough if you can "close" the iterator (which is of course also a common use case), but in many cases you just want a normal `Iterator` which doesn't need to be closed. In that case, it would be rude to force the client code to close the iterator out of convenience of the implementation (since in that case you wouldn't need it, if you implemented it normally).</div></div></div>