Yury Selivanov <yseliva...@gmail.com> added the comment: Thanks Jan. Thanks a lot for a short script to reproduce this bug.
The actual problem here is that asynchronous generators don't control their 'asend' and 'athrow' coroutines in any way. So if you have two of them iterating *in parallel* they will cause their asynchronous generator to be in an inconsistent state. The most obvious solution to this problem is to prohibit iterating 'asend'/'athrow' objects in parallel by throwing an exception. Nathaniel, what are your thoughts on this? ---------- nosy: +njs _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue30773> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com