diff --git a/paddle/fluid/framework/details/threaded_ssa_graph_executor.cc b/paddle/fluid/framework/details/threaded_ssa_graph_executor.cc index a6998f45df2d1ad32edbf191f6fbc5552142d0f6..2603aed62ac458a41e700669e3f5f1ae1877613f 100644 --- a/paddle/fluid/framework/details/threaded_ssa_graph_executor.cc +++ b/paddle/fluid/framework/details/threaded_ssa_graph_executor.cc @@ -125,7 +125,7 @@ FeedFetchList ThreadedSSAGraphExecutor::Run( // 2. Find ready variable bool timeout; - auto cur_ready_vars = ready_vars.PopAll(100, &timeout); + auto cur_ready_vars = ready_vars.PopAll(1000, &timeout); if (timeout) { if (exception_) { diff --git a/paddle/fluid/framework/details/threaded_ssa_graph_executor.h b/paddle/fluid/framework/details/threaded_ssa_graph_executor.h index da559d85535197389fd2e19bffde85aa223d38e9..2ea57ac8f96bc9c2b5c98bcd25d9ce921c3683cd 100644 --- a/paddle/fluid/framework/details/threaded_ssa_graph_executor.h +++ b/paddle/fluid/framework/details/threaded_ssa_graph_executor.h @@ -47,16 +47,6 @@ class BlockingQueue { cv_.notify_all(); } - T Pop() { - std::unique_lock lock(mutex_); - while (q_.empty()) { - cv_.wait(lock); - } - T v = q_.front(); - q_.pop_front(); - return v; - } - std::deque PopAll(size_t ms, bool *timeout) { auto time = std::chrono::system_clock::now() + std::chrono::milliseconds(ms);