mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Fix warnings and remove deleted file from installation.
This commit is contained in:
committed by
Mohammad Al-Turany
parent
44a59f25a7
commit
e37e559dce
@@ -34,6 +34,7 @@ DDS::DDS(const string name, const Plugin::Version version, const string maintain
|
||||
, fEvents()
|
||||
, fEventsMutex()
|
||||
, fNewEvent()
|
||||
, fDeviceTerminationRequested(false)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -67,6 +68,10 @@ auto DDS::HandleControl() -> void
|
||||
fEvents.push(newState);
|
||||
}
|
||||
fNewEvent.notify_one();
|
||||
if (newState == DeviceState::Exiting)
|
||||
{
|
||||
fDeviceTerminationRequested = true;
|
||||
}
|
||||
});
|
||||
|
||||
ChangeDeviceState(DeviceStateTransition::InitDevice);
|
||||
@@ -100,7 +105,7 @@ auto DDS::HandleControl() -> void
|
||||
|
||||
// wait until stop signal
|
||||
unique_lock<mutex> lock(fStopMutex);
|
||||
while (!DeviceTerminated())
|
||||
while (!fDeviceTerminationRequested)
|
||||
{
|
||||
fStopCondition.wait_for(lock, chrono::seconds(1));
|
||||
}
|
||||
@@ -129,7 +134,7 @@ auto DDS::FillChannelContainers() -> void
|
||||
if (GetProperty<string>(methodKey) == "bind")
|
||||
{
|
||||
fBindingChans.insert(make_pair(c.first, vector<string>()));
|
||||
for (unsigned int i = 0; i < c.second; ++i)
|
||||
for (int i = 0; i < c.second; ++i)
|
||||
{
|
||||
fBindingChans.at(c.first).push_back(GetProperty<string>(addressKey));
|
||||
}
|
||||
@@ -138,7 +143,7 @@ auto DDS::FillChannelContainers() -> void
|
||||
{
|
||||
fConnectingChans.insert(make_pair(c.first, DDSConfig()));
|
||||
LOG(DEBUG) << "preparing to connect: " << c.first << " with " << c.second << " sub-channels.";
|
||||
for (unsigned int i = 0; i < c.second; ++i)
|
||||
for (int i = 0; i < c.second; ++i)
|
||||
{
|
||||
fConnectingChans.at(c.first).fSubChannelAddresses.push_back(string());
|
||||
}
|
||||
|
@@ -74,6 +74,8 @@ class DDS : public Plugin
|
||||
std::queue<DeviceState> fEvents;
|
||||
std::mutex fEventsMutex;
|
||||
std::condition_variable fNewEvent;
|
||||
|
||||
std::atomic<bool> fDeviceTerminationRequested;
|
||||
};
|
||||
|
||||
REGISTER_FAIRMQ_PLUGIN(
|
||||
|
Reference in New Issue
Block a user