Andrew Svetlov <andrew.svet...@gmail.com> added the comment:
1. Suppose we have 2 concurrent producers, a single queue and a consumer. 2. The first producer puts several items into the queue and then calls q.close() 3. The second producer also puts several items. It doesn't matter the second producer closes the queue at the end or not. 4. The consumer gets items from the queue and prints them. What items are printed and what are canceled/skipped? With the proposed PR it depends on timings of putting and getting data items and the queue size. The output can vary from zero to all pushed data. That's why I think that the idea is not reliable. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37334> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com