title: Does copying a dict to multiple processes also copy the objects in the dict?
body: <p>I am running a function on multiple processes, which takes a dict of large pandas dataframes as input. When starting the processes, the dict is copied to each process, but as far as I understand, the dict only contais references to the dataframes, so the dataframes themselves are not copied to each process. Is this correct, or do each process get a deep copy of the dict?</p>
  
  <pre class="lang-py prettyprint-override"><code>import numpy as np
  from multiprocessing import Pool, Process, Manager
  
  def process_dataframe(df_dict, task_queue, result_queue):
      while True:
          try:
              test_value = task_queue.get(block=False)
          except:
              break
          else:
              result = {df_name: df[df==test_value].sum() for df_name, df in df_dict.items()}
              result_queue.put(result)
  
  
  
  if __name__ == '__main__':
      manager = Manager()
      task_queue = manager.Queue()
      result_queue = manager.Queue()
  
      df_dict = {'df_1': some_large_df1, 'df_2': some_large_df2, ...}
      test_values = np.random.rand(1000)
  
      for val in test_values:
          task_queue.put(val)
  
      with Pool(processes=4) as pool:
          processes = []
          for _ in range(4):
  
              # Is df_dict copied shallow or deep to each process?
              p = pool.Process(target=process_dataframe, args=(df_dict,task_queue,result_queue))  
              processes.append(p)
              p.start()
  
          for p in processes:
              p.join()
  
      results = [result_queue.get(block=False) for _ in range(result_queue.qsize())]
  
  </code></pre>