Remove locks
This commit is contained in:
@@ -7,15 +7,6 @@
|
||||
namespace ANSCENTER {
|
||||
bool ANSOVFBFD::Initialize(std::string licenseKey, ModelConfig modelConfig, const std::string& modelZipFilePath, const std::string& modelZipPassword, std::string& labelMap) {
|
||||
bool result = ANSFDBase::Initialize(licenseKey, modelConfig, modelZipFilePath, modelZipPassword, labelMap);
|
||||
// Serialize derived init against concurrent extract re-entries on the
|
||||
// same folder. See ModelFolderLockGuard in ANSEngineCommon.h.
|
||||
ModelFolderLockGuard _flg(_modelFolder, "ANSOVFBFD::Initialize");
|
||||
if (!_flg.acquired()) {
|
||||
this->_logger.LogError("ANSOVFBFD::Initialize",
|
||||
"Timed out waiting for model-folder lock: " + _modelFolder,
|
||||
__FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
labelMap = "Face";
|
||||
// We do not need to check for the license
|
||||
_licenseValid = true;
|
||||
@@ -79,15 +70,6 @@ namespace ANSCENTER {
|
||||
// We need to get the _modelFolder
|
||||
bool result = ANSFDBase::LoadModel(modelZipFilePath, modelZipPassword);
|
||||
if (!result) return false;
|
||||
// Serialize derived init against concurrent extract re-entries on the
|
||||
// same folder. See ModelFolderLockGuard in ANSEngineCommon.h.
|
||||
ModelFolderLockGuard _flg(_modelFolder, "ANSOVFBFD::LoadModel");
|
||||
if (!_flg.acquired()) {
|
||||
this->_logger.LogError("ANSOVFBFD::LoadModel",
|
||||
"Timed out waiting for model-folder lock: " + _modelFolder,
|
||||
__FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
// We need to get the modelfolder from here
|
||||
std::string xmlfile = CreateFilePath(_modelFolder, "ansovfb.xml");
|
||||
if (std::filesystem::exists(xmlfile)) {
|
||||
|
||||
Reference in New Issue
Block a user