New submission from Андрей Казанцев <hec...@yandex.ru>:
I have a problem with notifying all current subscribers and new subscribers about the closure of the queue and the reason. For example, I have a producer that reads messages from websocket or something else and send this to a queue, and several consumers (I do not know how many). If any exception occurred, then all current subscribers and subscribers which will be added later should know about this error. I tried to send an exception to a queue, but that did not help, because I have several consumers. Also, this will not protect new consumers. I propose to add a new close method with exc argument, which will throw an exception when calling the get method, and also throw an exception for all current _getters. ---------- components: asyncio messages: 370818 nosy: asvetlov, heckad, yselivanov priority: normal severity: normal status: open title: Add close method to queue _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40888> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com