Make WaitForAllComputation wait for work queue in 3D as well (#758)

Repeat the change in #754 by @gaschler for 3D as well.
master
Juraj Oršulić 2017-12-14 10:02:54 +01:00 committed by Wally B. Feed
parent f8452821d7
commit 29e4395a5a
1 changed files with 3 additions and 2 deletions

View File

@ -368,8 +368,9 @@ void PoseGraph::WaitForAllComputations() {
constraint_builder_.GetNumFinishedNodes(); constraint_builder_.GetNumFinishedNodes();
while (!locker.AwaitWithTimeout( while (!locker.AwaitWithTimeout(
[this]() REQUIRES(mutex_) { [this]() REQUIRES(mutex_) {
return constraint_builder_.GetNumFinishedNodes() == return ((constraint_builder_.GetNumFinishedNodes() ==
num_trajectory_nodes_; num_trajectory_nodes_) &&
!work_queue_);
}, },
common::FromSeconds(1.))) { common::FromSeconds(1.))) {
std::ostringstream progress_info; std::ostringstream progress_info;