Yury Selivanov <yseliva...@gmail.com> added the comment:

> 1. A CancelledError (or maybe`QueueCancelled`?) exception is raised in all 
> producers and consumers ) - this gives a producer a chance to handle the 
> error and do something with the waiting item that could not be `put()`

> 2. Items currently on the queue still get processed in the consumers before 
> the consumers exit.

This (especially 2) sounds quite tricky.

Maybe we should just add a method to Queue to get the list of current 
consumers, of pending consumers, and pending producers?  This way users can 
implement whatever semantics they want (probably :wink:).

----------

_______________________________________
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

Reply via email to