reset exception listener

This commit is contained in:
kswang 2021-01-06 10:47:14 +08:00
parent 1d1f6841b9
commit 51d6dbdffe
2 changed files with 2 additions and 0 deletions

View File

@ -292,6 +292,7 @@ void Executor::RunTask(const std::shared_ptr<Task> &task, bool sync) {
return finished;
});
}
ClearDoneTasks();
MsException::Instance().CheckException();
}

View File

@ -89,6 +89,7 @@ class WaitEvent : public ExceptionListener {
}
MsException::Instance().SetExceptionListener(const_cast<WaitEvent *>(this));
cond_var_.wait(lock, [this] { return !need_wait_; });
MsException::Instance().SetExceptionListener(nullptr);
MsException::Instance().CheckException();
}