code: def _runner(self, job, runtime_context):
          
          try:
              job.run(runtime_context)
          except WorkflowException as err:
              _logger.exception("Got workflow error")
              self.exceptions.append(err)
          except Exception as err:  # pylint: disable=broad-except
              _logger.exception("Got workflow error")
              self.exceptions.append(WorkflowException(Text(err)))
          finally:
              with runtime_context.workflow_eval_lock:
                  self.threads.remove(threading.current_thread())
                  if isinstance(job, JobBase):
                      self.allocated_ram -= job.builder.resources["ram"]
                      self.allocated_cores -= job.builder.resources["cores"]
                  runtime_context.workflow_eval_lock.notifyAll()
docs: Job running thread.