This question is related to Python Multiprocessing. I am asking for a suitable interprocess communication data-structure for my specific scenario:
My scenario
I have one producer and one consumer.
- The producer produces a single fairly small panda Dataframe every 10-ish secs, then the producer puts it on a
python.multiprocess.queue
. - The consumer is a GUI polling that
python.multiprocess.queue
every 100ms. It is VERY CRITICAL that the consumer catches every single DataFrame the producer produces.
My thinking
python.multiprocess.queue
is serving the purpose (I think), and amazingly simple to use! (praise the green slithereen lord!). But I am clearly not utilizing queue's full potential with only one producer one consumer and a max of one item on the queue. That leads me to believe that there is simpler thing than queue. I tried to search for it, I got overwhelmed by options listed in: python 3.5 documentation: 18. Interprocess Communication and Networking
. I am also suspecting there may be a way not involving interprocess communication data-structure at all for my need.
Please Note
- Performance is not very important
- I will stick with multiprocessing for now, instead of multithreading.
My Question
Should I be content with queue? or is there a more recommended way? I am not a professional programmer, so I insist on doing things the tried and tested way. I also welcome any suggestions of alternative ways of approaching my problem.
Thanks
quite awkward as well. – eliu Apr 20 '16 at 16:07