title: Python sharing a deque between multiprocessing processes
body: <p>I've been looking at the following questions for the pas hour without any luck:</p>
  
  <p><a href="https://stackoverflow.com/questions/11025005/python-sharing-a-dictionary-between-parallel-processes">Python sharing a dictionary between parallel processes</a></p>
  
  <p><a href="https://stackoverflow.com/questions/659865/multiprocessing-sharing-a-large-read-only-object-between-processes">multiprocessing: sharing a large read-only object between processes?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/22487296/multiprocessing-in-python-sharing-large-object-e-g-pandas-dataframe-between/22487898">multiprocessing in python - sharing large object (e.g. pandas dataframe) between multiple processes</a></p>
  
  <p>I've written a very basic test file to illustrate what I'm trying to do:</p>
  
  <pre><code>from collections import deque
  from multiprocessing import Process
  import numpy as np
  
  
  class TestClass:
      def __init__(self):
          self.mem = deque(maxlen=4)
          self.process = Process(target=self.run)
  
      def run(self):
          while True:
              self.mem.append(np.array([0, 1, 2, 3, 4]))
  
  
  def print_values(x):
      while True:
          print(x)
  
  
  test = TestClass()
  process = Process(target=print_values(test.mem))
  
  test.process.start()
  process.start()
  </code></pre>
  
  <p>Currently this outputs the following :</p>
  
  <pre><code>deque([], maxlen=4)
  </code></pre>
  
  <p>How can I access the mem value's from the main code or the process that runs "print_values"?</p>