title: Python Process only spawning one process in loop
body: <p>I have a Python 3.7 program I'm writing that has a main script <code>a.py</code> that creates an instance of a class in another script <code>b.py</code>. I want <code>a.py</code> to be able to create multiple simultaneous instances of my class in <code>b.py</code>, but the code I'm using to call <code>b.py</code> seems to only spawn one instance at a time.</p>
  
  <p>The code I have looks like this:</p>
  
  <pre><code>import b
  from multithreading import Process
  
  processes = []
  while (True):
      dataFiles = getFilesFromDatabase()
      if len(dataFiles) &gt; 0:
          for file in dataFiles:
              p = Process(target=b.class, args=(file,), name=file['name'])
              p.start()
              processes.append(p)
  
      sleep(60)
  </code></pre>
  
  <p>When <code>dataFiles</code> (a list of dictionaries) has multiple dictionaries, a <code>Process</code> is spawned for <code>dataFiles[0]</code>, but <code>dataFiles[1]</code> is not started until after <code>dataFiles[0]</code> finishes. I'm not calling <code>Process.join()</code> anywhere so I'm not sure what could be wrong. Do I need to use a <code>Pool</code> for this? Is there anything else I'm missing?</p>
  
  <p>Any help appreciated!</p>