title: Python sharing a dict with Event() variables inside it between parent and child processes
body: <p>I want to share a dict with some Event() variables inside it between parent and child processes but don't know how. Notice that I need to add or delete (key, value) after the process is started. It seems that neither a normal dict nor a multiprocessing.Manager.dict like below can satisfy my requirements.</p>
  
  <pre><code>import time
  from multiprocessing import Process, Event, Manager
  
  manager = Manager()
  d1 = manager.dict()
  #  d1 = dict()
  
  def fun():
      # do something and then set d1[1]
      time.sleep(4)
      d1[1].set()
  
  p = Process(target=fun, name='fun')
  p.start()
  d1[1] = Event() # add a (key, value) after the process is defined
  p.join()
  print 'After fun, d1[1] = %s' % (d1[1].is_set())
  </code></pre>
  
  <p>So what is the right way to share these semaphores between parent and child processes?</p>