Fix mutex lock issues
This commit is contained in:
@@ -2135,8 +2135,9 @@ namespace ANSCENTER
|
||||
|
||||
// Update model configuration with the new parameters (brief lock for config)
|
||||
if (confidenceThreshold > 0) {
|
||||
std::lock_guard<std::recursive_mutex> cfgLock(_mutex);
|
||||
_modelConfig.detectionScoreThreshold = confidenceThreshold;
|
||||
auto cfgLock = TryLockWithTimeout("ANSODBase::RunInferenceWithOption", 2000);
|
||||
if (cfgLock.owns_lock())
|
||||
_modelConfig.detectionScoreThreshold = confidenceThreshold;
|
||||
}
|
||||
switch (mode) {
|
||||
case 0: // Normal mode
|
||||
|
||||
Reference in New Issue
Block a user