title: Python include while loop inside parallelized task
body: <p>I am trying to build a parallelized task where aset of calculations happen in paraller with different set o parameters. Then in each of these independent tasks there are some while loops that for each of these tasks run through a lit of parameters.</p>
  <p>The result of each parallelized task is saved in a csv file. However the while loops seem to not progress each parallelized task stops at the first iteration of the while loop.</p>
  <p>Any possible explanations for that?</p>
  <p>The actual code is way to big to post here but an abstraction could be this:</p>
  <pre><code>def inner_func(a,b):
      while a&lt;b:
          write_to_file(a)
          a++
  
  if __name__ == '__main__':
      arguments=[(a,b),(b,c)]
      with multiprocessing.Pool(processes=6) as pool:
          pool.map(inner_func, arguments)
  </code></pre>