提交 fab8457e 编写于 作者: Q Qiao Longfei

code optimize

上级 ada43e89
......@@ -68,20 +68,18 @@ FeedFetchList AsyncSSAGraphExecutor::Run(
if (pool_) {
run_futures.emplace_back(pool_->enqueue(std::move(call)));
for (auto &f : run_futures) {
if (exception_holder_.IsCaught()) {
f.wait();
} else {
fetch_data.emplace_back(std::move(f.get()));
}
}
} else {
fetch_data.emplace_back(std::move(call()));
}
}
if (pool_) {
for (auto &f : run_futures) {
if (exception_holder_.IsCaught()) {
f.wait();
} else {
fetch_data.emplace_back(std::move(f.get()));
}
}
}
if (exception_holder_.IsCaught()) {
exception_holder_.ReThrow();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册