code: def run(self):
          
          while True:
              task = self.tasks_queue.get()
              if task is None:
                  self.tasks_queue.task_done()
                  break
              # No exception detected in any thread,
              # continue the execution.
              if self.exceptions_queue.empty():
                  try:
                      # Execute the task
                      func, args, kargs = task
                      result = func(*args, **kargs)
                      self.results_queue.put(result)
                  except Exception as e:
                      self.exceptions_queue.put(e)
              # Mark this task as done, whether an exception happened or not
              self.tasks_queue.task_done()
docs: Continously receive tasks and execute them