!14713 fix parallel ut probabilistic timeout
From: @yao_yf Reviewed-by: @kisnwang,@stsuteng Signed-off-by: @stsuteng
This commit is contained in:
commit
48854db845
|
@ -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_);
|
||||
|
|
Loading…
Reference in New Issue