title: How to submit `Value` instance to `ProcessPoolExecutor`?
body: <p>I want to use <a href="https://docs.python.org/3.8/library/multiprocessing.html#sharing-state-between-processes" rel="nofollow noreferrer">sharing state</a> with <code>ProcessPoolExecutor</code></p>
  
  <p>Code:</p>
  
  <pre class="lang-py prettyprint-override"><code>from multiprocessing import Value
  from concurrent.futures import ProcessPoolExecutor
  
  def function(times, a):
      print('I\'m here')
      for _ in range(times):
          with a.get_lock():
              a.value += 1
  
  
  def main():
      a = Value('I', 0, lock=True)
  
      with ProcessPoolExecutor(max_workers=5) as executor:
          for i in range(5):
              executor.submit(function, 1000000, a)
  
      print("----------------------", a.value)
  
  
  main()
  </code></pre>
  
  <p>But it stucks and don't even prints 'I'm here'</p>