Optimize locking
parent
027a4a5a8e
commit
af1dedb879
|
@ -148,15 +148,9 @@ struct EliminationData {
|
|||
}
|
||||
// Set up BayesTree parent and child pointers
|
||||
if (parentData) {
|
||||
#ifdef GTSAM_USE_TBB
|
||||
parentData->writeLock->lock();
|
||||
#endif
|
||||
if (parentData->parentData) // If our parent is not the dummy node
|
||||
bayesTreeNode->parent_ = parentData->bayesTreeNode;
|
||||
parentData->bayesTreeNode->children.push_back(bayesTreeNode);
|
||||
#ifdef GTSAM_USE_TBB
|
||||
parentData->writeLock->unlock();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue