title: Python - Multiprocessing Error 'cannot start a process twice'
body: <p>I try to develop an algorithm using <code>multiprocessing</code> package in Python, i learn some tutorial from internet and try to develop an algorithm with this package. After looking around and try my 'hello world' using <code>Process</code>, <code>Queue</code> and <code>Pool</code>, i try to implement the Queue on this code</p>
  
  <pre><code>def main(queue):
     d = ...
     k = ...
     filename, patname, txt, pat = ...
     R = queue
     processes = []
  
     for j in range(k-1):
          processes.append(Process(target=sim, args=(int(j * d), int((j+1) * d), txt, pat, filename, patname, R, )))
  
     # processes.append(Process(target=sim, args=(int(j * d), len(txt), txt, pat, filename, patname, R, )))       
  
     for pr in processes:
          pr.start()
  
     for pr in processes:
          pr.join()
  
     while not R.empty():
          print (R.get())
  
  if __name__ == '__main__':
      R = Queue()
      main(R)
  </code></pre>
  
  <p>But, got error like:</p>
  
  <pre><code>AssertionError: Cannot start a process twice
  </code></pre>
  
  <p>Can somebody please help with this issue</p>
  
  <p>full output:</p>
  
  <pre><code>sim(e_original.txt, e_modify0%.txt) = 0.000000
  sim(e_original.txt, e_modify0%.txt) = 0.000000
  1
  Traceback (most recent call last):
    File "measure.py", line 108, in &lt;module&gt;
      main()
    File "measure.py", line 98, in main
      pr.start()
    File "C:\Python27\lib\multiprocessing\process.py", line 120, in start
      assert self._popen is None, 'cannot start a process twice'
  AssertionError: cannot start a process twice
  sim(e_original.txt, e_modify0%.txt) = 0.000000
  </code></pre>