title: Pool and Manager in multiprocessing module
body: <pre><code>from multiprocessing import Pool, Manager
  
  
  def test(num):
      queue.put(num)
  
  
  queue = Manager().Queue()
  pool = Pool(5)
  
  for i in range(30):
      pool.apply_async(test, (i, ))
  
  pool.close()
  pool.join()
  
  print(queue.qsize())
  </code></pre>
  
  <p>The output of the code above is 30. However, if line 8 is exchanged with line 9 (see the code below), the output will be 0. So is there anybody who knows why? Thank you!</p>
  
  <pre><code> from multiprocessing import Pool, Manager
  
  
   def test(num):
     queue.put(num)
  
  
   pool = Pool(5)
   queue = Manager().Queue()
  
  for i in range(30):
      pool.apply_async(test, (i, ))
  
  pool.close()
  pool.join()
  
  print(queue.qsize())
  </code></pre>