Optimize locking

release/4.3a0
Fan Jiang 2022-04-05 23:25:09 -04:00
parent 027a4a5a8e
commit af1dedb879
1 changed files with 0 additions and 6 deletions

View File

@ -148,15 +148,9 @@ struct EliminationData {
} }
// Set up BayesTree parent and child pointers // Set up BayesTree parent and child pointers
if (parentData) { if (parentData) {
#ifdef GTSAM_USE_TBB
parentData->writeLock->lock();
#endif
if (parentData->parentData) // If our parent is not the dummy node if (parentData->parentData) // If our parent is not the dummy node
bayesTreeNode->parent_ = parentData->bayesTreeNode; bayesTreeNode->parent_ = parentData->bayesTreeNode;
parentData->bayesTreeNode->children.push_back(bayesTreeNode); parentData->bayesTreeNode->children.push_back(bayesTreeNode);
#ifdef GTSAM_USE_TBB
parentData->writeLock->unlock();
#endif
} }
} }