[issue3831] Multiprocessing: Expose underlying pipe in queues
Andres Freund
report at bugs.python.org
Wed Jun 9 08:34:08 CEST 2010
Andres Freund <andres at anarazel.de> added the comment:
As soon as some bytes are signalled as being available one can simply do a normal get(). I don't really see the problem here?
Sure, the get() might not be completely non-blocking (especially if the transferred event is more than the size of a pipe-buffer) but I have a hard time seing that as a problem as that should be both rare and only last a short time.
My personal use-case is being able to efficiently wait for evens from different queues - using the standard api one currently can only do that by busy looping...
The biggest thing I see where you have to be careful here is some stomping herd phenomenon you will get into if you have multiple readers doing a poll().
Namely *all* off those processes will awake and run into .get() which isnt exactly nice, but thats hardly solvable on python level.
----------
nosy: +andresfreund
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3831>
_______________________________________
More information about the Python-bugs-list
mailing list