title: python multiprocessing does not run at same time
body: <p>I am trying to make a python program that runs multiple processes each in an infinite loop at the same time, but only one process will execute at a time, the first one in code, then the rest of the program will not run. What do i need to do to make both procceses and the main one execute at the same time?</p>
  
  <pre><code>from multiprocessing import *
  import time
  
  
  def test1(q):
      while True:
          q.put("Banana")
          time.sleep(2)
  
  
  
  def test2(q):
      while True:
          q.put("internet")
          time.sleep(3)
  
  
  if __name__ == "__main__":
       q = Queue()
       t1 = Process(target=test1(q))
       t2 = Process(target=test2(q))
       t1.start()
       t2.start()
       q.put("rice")
       while True:
           print(q.get())
  </code></pre>