title: Writing to dictionary of objects in parallel
body: <p>I have a dictionary of objects, and I would like to populate this dictionary using the multiprocessing package. This bit of code runs "Run" many times in parallel.</p>
  
  <pre><code>Data=dict()
  for i in range:
     Data[i]=dataobj(i) #dataobj is a class I have defined elsewhere
     proc=Process(target=Run, args=(i, Data[i]))
     proc.start()
  </code></pre>
  
  <p>Where "Run" does some simulations, and saves the output in the dataobj object</p>
  
  <pre><code>def Run(i, out):
      [...some code to run simulations....]
      out.extract(file)
  </code></pre>
  
  <p>My code creates a dictionary of objects, and then modifies the objects in that dictionary in parallel. Is this possible, or do I need to acquire a lock every time I modify an object in the shared dictionary?</p>