def finish(self): """Finish the task run. Call this method after the task has stopped. If there was raised an exception during the task run, it will be raised here again. """ threadMgr.raise_if_error(self._thread_name)