mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
FairMQ: Move static and interactive control modes to plugin
NOT YET FINISHED
This commit is contained in:
committed by
Mohammad Al-Turany
parent
2af3ae99eb
commit
10f67e4c72
@@ -89,9 +89,9 @@ const std::unordered_map<PluginServices::DeviceStateTransition, FairMQDevice::Ev
|
||||
|
||||
auto PluginServices::ChangeDeviceState(const std::string& controller, const DeviceStateTransition next) -> void
|
||||
{
|
||||
lock_guard<mutex> lock{fDeviceControllerMutex};
|
||||
|
||||
if(!fDeviceController) fDeviceController = controller;
|
||||
// lock_guard<mutex> lock{fDeviceControllerMutex};
|
||||
//
|
||||
// if(!fDeviceController) fDeviceController = controller;
|
||||
|
||||
if(fDeviceController == controller)
|
||||
{
|
||||
@@ -159,5 +159,8 @@ auto PluginServices::WaitForReleaseDeviceControl() -> void
|
||||
{
|
||||
unique_lock<mutex> lock{fDeviceControllerMutex};
|
||||
|
||||
fReleaseDeviceControlCondition.wait(lock, [&]{ return !GetDeviceController(); });
|
||||
while(GetDeviceController())
|
||||
{
|
||||
fReleaseDeviceControlCondition.wait(lock);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user