mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-16 01:51: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
@@ -12,6 +12,8 @@
|
||||
* @author A. Rybalchenko
|
||||
*/
|
||||
|
||||
#include <cstdlib> // quick_exit()
|
||||
|
||||
#include <nanomsg/nn.h>
|
||||
#include <nanomsg/pipeline.h>
|
||||
#include <nanomsg/pubsub.h>
|
||||
@@ -72,7 +74,7 @@ FairMQPollerNN::FairMQPollerNN(map< string,vector<FairMQChannel> >& channelsMap,
|
||||
{
|
||||
LOG(ERROR) << "At least one of the provided channel keys for poller initialization is invalid";
|
||||
LOG(ERROR) << "Out of Range error: " << oor.what() << '\n';
|
||||
exit(EXIT_FAILURE);
|
||||
quick_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +109,7 @@ FairMQPollerNN::FairMQPollerNN(FairMQSocket& dataSocket, FairMQSocket& cmdSocket
|
||||
else
|
||||
{
|
||||
LOG(ERROR) << "invalid poller configuration, exiting.";
|
||||
exit(EXIT_FAILURE);
|
||||
quick_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +163,7 @@ bool FairMQPollerNN::CheckInput(const string channelKey, const int index)
|
||||
{
|
||||
LOG(ERROR) << "Invalid channel key: \"" << channelKey << "\"";
|
||||
LOG(ERROR) << "Out of Range error: " << oor.what() << '\n';
|
||||
exit(EXIT_FAILURE);
|
||||
quick_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +182,7 @@ bool FairMQPollerNN::CheckOutput(const string channelKey, const int index)
|
||||
{
|
||||
LOG(ERROR) << "Invalid channel key: \"" << channelKey << "\"";
|
||||
LOG(ERROR) << "Out of Range error: " << oor.what() << '\n';
|
||||
exit(EXIT_FAILURE);
|
||||
quick_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12,6 +12,7 @@
|
||||
* @author A. Rybalchenko
|
||||
*/
|
||||
|
||||
#include <cstdlib> // quick_exit()
|
||||
#include <sstream>
|
||||
|
||||
#include "FairMQSocketNN.h"
|
||||
@@ -45,7 +46,7 @@ FairMQSocketNN::FairMQSocketNN(const string& type, const std::string& name, int
|
||||
if (fSocket == -1)
|
||||
{
|
||||
LOG(ERROR) << "failed creating socket " << fId << ", reason: " << nn_strerror(errno);
|
||||
exit(EXIT_FAILURE);
|
||||
quick_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -54,7 +55,7 @@ FairMQSocketNN::FairMQSocketNN(const string& type, const std::string& name, int
|
||||
if (fSocket == -1)
|
||||
{
|
||||
LOG(ERROR) << "failed creating socket " << fId << ", reason: " << nn_strerror(errno);
|
||||
exit(EXIT_FAILURE);
|
||||
quick_exit(EXIT_FAILURE);
|
||||
}
|
||||
if (type == "sub")
|
||||
{
|
||||
|
Reference in New Issue
Block a user