title: Multiprocessing: How to use pool.map on a list and function with arguments?
body: <p>I have some misunderstandings with multiprocessing and map function.</p>
  
  <p>I'll try to describe briefly: </p>
  
  <p>Firstly, I have an list, for instance: </p>
  
  <pre><code>INPUT_MAGIC_DATA_STRUCTURE = [
      ['https://github.com', 'Owner', 'Repo', '', '', '0', '0'],
      ['https://github.com', 'Owner', 'Repo', '', '', '0', '0'],
      ['https://github.com', 'Owner', 'Repo', '', '', '0', '0'],
      ['https://github.com', 'Owner', 'Repo', '', '', '0', '0'],
      ['https://github.com', 'Owner', 'Repo', '', '', '0', '0'],
      ['https://github.com', 'Owner', 'Repo', '', '', '0', '0'],
  ]
  </code></pre>
  
  <p>Also I have method, which currently parsing this list using specific internal logic:</p>
  
  <pre><code>def parse(api_client1, api_client2):
       for row in INPUT_MAGIC_DATA_STRUCTURE: 
           parsed_repo_row = ... (some logic with row)
           OUTPUT_MAGIC_DATA_STRUCTURE.append(parsed_repo_row)
  </code></pre>
  
  <p>Finally, I've red that there is some variants to make it async instead of <code>for</code>.</p>
  
  <pre><code>from multiprocessing import Pool
      pool = Pool(10)
      pool.map(&lt;???&gt;, INPUT_MAGIC_STRUCTURE)
  </code></pre>
  
  <p><code>???</code> – I cannot understand how to transfer my <code>parse()</code> from <code>for row in INPUT_MAGIC_DATA_STRUCTURE</code> as a first argument to <code>pool.map()</code> and transfer all its arguments — api_client1, api_client2. </p>
  
  <p>Could you help me? </p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>UPD:</strong></p>
  
  <p>I've already made: </p>
  
  <pre><code>pool = Pool(10)
  pool.map(parse(magic_parser, magic_staff), INPUT_MAGIC_DATA_STRUCTURE)
  </code></pre>
  
  <p>Anyway, when interpreter comes to the second line it stops and makes only one instance of parse() method (I see the logging output of parsed rows: 1 , 2 , 3 , 4 , 5 – one by one).</p>