!14713 fix parallel ut probabilistic timeout

From: @yao_yf
Reviewed-by: @kisnwang,@stsuteng
Signed-off-by: @stsuteng
This commit is contained in:
mindspore-ci-bot 2021-04-07 17:04:49 +08:00 committed by Gitee
commit 48854db845
1 changed files with 1 additions and 1 deletions

View File

@ -278,11 +278,11 @@ void Executor::ClearDoneTasks() {
}
void Executor::RunTask(const std::shared_ptr<Task> &task, bool sync, bool long_run) {
sync_run_task_finished_ = false;
{
std::lock_guard<std::mutex> lock(task_mutex_);
ready_tasks_.push(task);
}
sync_run_task_finished_ = false;
task_cond_var_.notify_all();
if (sync && !sync_run_task_finished_) {
std::unique_lock<std::mutex> lock(task_mutex_);