Hello,
I was wondering whether there was a way to make multiprocessing.Queue behave in a priority queue-like fashion. Subclassing with heappush and heappop for put and get doesn't work the old way (multiprocessing.Queue seems to use different data structures than Queue.Queue?)

Could one create a heapq within the producer as a proxy, and then feed a proper queue from that? Does anyone have an idea on how to deal with the queue item flow control? (Since all of the sorting has to happen within the heapq, it should only pass items to the real Queue if it's empty?)

Thanks in advance!

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to