Thomas Kluyver <tho...@kluyver.me.uk> added the comment:

I think this is expected. The queue itself doesn't know that one particular 
process is meant to put data into it. It just knows that there's no data to 
get, so .get() blocks as the docs say it should.

This doesn't apply to issue22393, because the pool knows about its worker 
processes, so if one dies before completing a task, it can know something is 
wrong.

You could add a method to 'half close' a queue, so it can only be used for 
receiving, but not sending. If you called this in the parent process after 
starting the child, then if the child died, the queue would know that nothing 
could ever put data into it, and .get() could error. The channels API in Trio 
allows this, and it's the same idea I've just described at the OS level in 
issue43806.

----------
nosy: +takluyver

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

Reply via email to