title: Thread is not printing properly
body: <p>I can't seem to bring multithreading to work.
  I simplified my problem and I still can't get my threads to print properly (so I guess they're not executing correctly).</p>
  <pre><code>import time, threading
  
  s_print_lock = threading.Lock()
  
  def s_print(*a, **b):
  
      with s_print_lock:
          print(*a, **b)
  # Thread safe print function
  
  def a():
      while True:
          s_print('\'a\' is running')
          time.sleep(5)
  # Thread 1
  
  def b():
      while True:
          s_print('\'b\' is running')
          time.sleep(5)
  # Thread 2
  
  if __name__ == &quot;__main__&quot;:
      t1 = threading.Thread(target=a())
      t2 = threading.Thread(target=b())
  
      t1.start()
      t2.start()
  </code></pre>
  <p>And the output is:</p>
  <pre><code>'a' is running
  'a' is running
  'a' is running
  'a' is running
  ...
  </code></pre>