title: processing a dictionary in multithreading is locked
body: <p>I'm trying to process a dictionary in a multiprocess scenario, but the process is locked and function process_data is never fired.</p>
  
  <pre><code>if __name__ == "__main__":
      manager = Manager()
      directoary_names = manager.dict(lock=True)
      time_list = manager.list()
      with lock:
          ts = datetime.datetime.strptime('2018-08-21', '%Y-%m-%d')
          end_ts = datetime.datetime.strptime('2018-8-21', '%Y-%m-%d')
          while ts &lt;= end_ts:
              print(ts)
              ts += datetime.timedelta(minutes=15)
              path = os.path.join(
                  r'C:\\ahmed\\SpeedFT-meter1\\peakdata\\' + ts.strftime("%Y-%m-%d") + r'\\peakdata_' + ts.strftime(
                      "%Y%m%d_%H%M") + r'.bz2')
              time_list.append(ts)
              directoary_names[path] = time_list.pop()
  
      modified_dic = directoary_names
      p = Pool(4)
      t = p.map(process_data, modified_dic)
      p.close()
      p.join()
  </code></pre>