|
|
|
|
@ -86,6 +86,7 @@ ResourceManager::ResourceManager()
|
|
|
|
|
InitThread = nullptr;
|
|
|
|
|
DetectDevicesThread = nullptr;
|
|
|
|
|
dynamic_detectors_processed = false;
|
|
|
|
|
init_finished = false;
|
|
|
|
|
|
|
|
|
|
SetupConfigurationDirectory();
|
|
|
|
|
|
|
|
|
|
@ -1632,6 +1633,8 @@ void ResourceManager::InitThreadFunction()
|
|
|
|
|
{
|
|
|
|
|
cli_post_detection();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
init_finished = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ResourceManager::UpdateDetectorSettings()
|
|
|
|
|
@ -1735,6 +1738,19 @@ void ResourceManager::UpdateDetectorSettings()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ResourceManager::WaitForInitialization()
|
|
|
|
|
{
|
|
|
|
|
/*-------------------------------------------------*\
|
|
|
|
|
| A reliable sychronization of this kind is |
|
|
|
|
|
| impossible without the use of a `barrier` |
|
|
|
|
|
| implementation, which is only introduced in C++20 |
|
|
|
|
|
\*-------------------------------------------------*/
|
|
|
|
|
while (!init_finished)
|
|
|
|
|
{
|
|
|
|
|
std::this_thread::sleep_for(1ms);
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ResourceManager::WaitForDeviceDetection()
|
|
|
|
|
{
|
|
|
|
|
DetectDeviceMutex.lock();
|
|
|
|
|
|