forked from mindspore-Ecosystem/mindspore
!11000 reset exception listener
From: @kisnwang Reviewed-by: @chujinjin,@wuxuejian Signed-off-by: @wuxuejian
This commit is contained in:
commit
2145757ced
|
@ -292,6 +292,7 @@ void Executor::RunTask(const std::shared_ptr<Task> &task, bool sync) {
|
|||
return finished;
|
||||
});
|
||||
}
|
||||
ClearDoneTasks();
|
||||
MsException::Instance().CheckException();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue