Open gaschler opened 6 years ago
Looks like the mutex annotation for these three should be removed from the header?
Removing the annotation would only hide the issue. If we want one thread (main) to dispatch work items while a background thread is supposed to optimize, then the proper solution is to have more fine-grained mutexes and not just one for PoseGraph, I think.
PoseGraph
doesn't hold a mutex when callingOptimizationProblem::Solve
, there is a comment https://github.com/googlecartographer/cartographer/blob/master/cartographer/mapping/internal/3d/pose_graph_3d.cc#L600.Maybe it should at least hold a smaller mutex that guards the input to the optimization problem.