title: How do I run multiple PyQt QTimers in a true concurrency manner?
body: <p>I want to have two PyQt QTimers in my application where one performs the regular tasks that do not require much computation but, the other one performs some heavy workload. The two timers should run independently without anyone causing a delay in other's execution.</p>
  
  <p>Currently, I have initialized two periodic timers such that, each times out after 10 milliseconds and calls its respective slot function. The code is shown below:</p>
  
  <pre><code>from PyQt5.QtCore import QTimer
  from PyQt5.QtWidgets import QApplication
  from PyQt5.QtCore import QCoreApplication
  import sys
  import time
  
  
  def first_timer_function():
      # Some heavy task to be performed in this function
      time.sleep(10)
      print "First Timer Fired"
  
  
  def second_timer_function():
      # Regular tasks to be performed in this function
      print "Second Timer Fired"
  
  
  if __name__ == "__main__":
      app = QCoreApplication.instance()
      if app is None:
          app = QApplication(sys.argv)
  
      first_timer = QTimer()
      first_timer.timeout.connect(first_timer_function)
      first_timer.start(10)
  
      second_timer = QTimer()
      second_timer.timeout.connect(second_timer_function)
      second_timer.start(10)
  
      sys.exit(app.exec_())
  </code></pre>
  
  <p>The "first_timer" Timer has to perform the heavy computation simulated by the 10-second sleep. When I run this code, the "second_timer" suffers from a delay equal to the time taken by the "first_timer" slot function to perform its task. I read the documentation of QTimers and it turns out that all the QTimers run in one thread, therefore, the execution time of "first_timer" delays the "second_timer". </p>
  
  <p>Should I just create two separate threads each running one of these Timers. What is ideally the best practice for achieving the true parallelism of QTimers?</p>