Remove locks

This commit is contained in:
2026-04-24 17:10:29 +10:00
parent 7a11c9617b
commit 3a527d2dad
51 changed files with 38 additions and 1251 deletions

View File

@@ -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)) {