title: Python multiprocessing get the results
body: <p>I'm trying to understand the Python multiprocessing module. The below code creates 4 process and tries run the function <code>f(x)</code>.</p>
  
  <p>Questions </p>
  
  <ol>
  <li>I'm creating 4 processes but submitting multiple tasks (f,[10]). Will the module will automatically run every 4 process at any time?</li>
  <li>I capture the result in a list. What will the <code>pool.apply_async</code> will return, Will it be print statements in the job or whatever returned by the method?</li>
  </ol>
  
  <p>When I execute this code, it just displays 100 but not other values.</p>
  
  <pre><code>from multiprocessing import Pool
  
  def f(x):
  
      print x*x
      return x*x
  
  
  if __name__ == '__main__':
  
      result = []
      pool = Pool(processes=4)            
      result.append(pool.apply_async(f, [10]))
      out = map(lambda x: x.get(), result)   
  </code></pre>