title: Multiprocessing two indefinitely running functions while sharing data
body: <p>I'm new with multiprocessing in Python. I need three functions to run simultaneously while also doing stuff to the same &quot;multiprocessing queues&quot; and exchanging them. I'm getting thousands of frames in second from a camera so I need these functions to run in parallel to operate fast and not lose any data. My main problem is that when I make any changes to the contents of this queues in any of these functions, the other functions doesn't realize them in real time. All functions need to run indefinitely meaning all of them has infinite loops inside them.  For example if I put &quot;1&quot; into queue1 in func1, I want func2 to realize this change in the next loop.
  My pseudo code looks like this:</p>
  <pre><code>import multiprocessing as mp
  
  ** func1 is getting data from a camera continuously**
  
  def func1 (queue1,data):
      while True:
          **doing some stuff with data**
          if (condition)          
             queue1.put(data)  
          **I never break the loop**
  
  def func2(queue1, queue2):
      while True:
          data = queue1.get()
          **doing some stuff with data**
          if (condition)          
             queue2.put(data)
          **I never break the loop**
  
  
  def func3(queue2):
      while True:
          data = queue2.get()
          **doing some stuff with data**
          
          **I never break the loop**
  
  
  if __name__ == '__main__':
      
      queue1 = mp.Queue()
      queue2 = mp.Queue()
      p1 = mp.Process(target=func1,args=(queue1,))
      p1.start()
      p2 = mp.Process(target=func2, args=(queue1,queue2))
      p2.start()
      p3 = mp.Process(target=func3, args=(queue2,))
      p3.start()
  
  
  </code></pre>
  <p>For example, func1 might put something to queue1 and func2  gets that item from queue1 and then works on it. Depending on the result func2 puts something into queue2 and func3 operates on queue2. I thought mp.Queue() is a shared memory but when changes are made to the queue inside a function the other functions doesn't get updated.
  I'm working on Windows 10 and Python 3.10.
  Thank u!</p>