akhi singhania <akhi3...@gmail.com> added the comment:

Thank you very much for the reply and the link.  It seems like I escaped that 
bit in the documentation, my apologises.  I can confirm that using 
cancel_join_thread() removes the need for explicitly calling queue.close().

May I please ask for some more clarification if you do not mind.  My 
understanding now is that, there are two scenarios to consider when a process 
using queues tries to exit:

- The default behaviour seems to be that the process must flush the queue 
before it exits.  This is useful as it will ensure that none of the queued data 
is lost which can be very useful in some circumstances.

- The alternate behaviour (which can be enabled by setting 
cancel_join_thread()) is that you don't care about losing the data in the queue 
and just want to exit.  Again this can be useful in some circumstances if you 
don't care if the data is lost and emptying out the queue might potentially 
take a long time.


Does the above sound about right?  Thank you very much for your explanation and 
sorry again for the noise.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35122>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to