mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Add orthogonal OK/ERROR states.
Replace state check mutex with atomic. Update DDS example documentation.
This commit is contained in:
committed by
Mohammad Al-Turany
parent
a7ab33a10e
commit
fbf7dbf2ba
@@ -28,15 +28,14 @@ void FairMQExample2Sink::Run()
|
||||
{
|
||||
while (CheckCurrentState(RUNNING))
|
||||
{
|
||||
FairMQMessage* msg = fTransportFactory->CreateMessage();
|
||||
unique_ptr<FairMQMessage> msg(fTransportFactory->CreateMessage());
|
||||
|
||||
fChannels.at("data-in").at(0).Receive(msg);
|
||||
|
||||
LOG(INFO) << "Received message: \""
|
||||
<< string(static_cast<char*>(msg->GetData()), msg->GetSize())
|
||||
<< "\"";
|
||||
|
||||
delete msg;
|
||||
if (fChannels.at("data-in").at(0).Receive(msg) > 0)
|
||||
{
|
||||
LOG(INFO) << "Received message: \""
|
||||
<< string(static_cast<char*>(msg->GetData()), msg->GetSize())
|
||||
<< "\"";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user