add support for I/O threads to the interface (only used with ZeroMQ).

This commit is contained in:
Alexey Rybalchenko
2014-05-27 19:01:49 +02:00
parent 24d26e802a
commit e80e6d4269
10 changed files with 24 additions and 18 deletions

View File

@@ -11,7 +11,7 @@
#include "FairMQMessageNN.h"
#include "FairMQLogger.h"
FairMQSocketNN::FairMQSocketNN(const string& type, int num) :
FairMQSocketNN::FairMQSocketNN(const string& type, int num, int numIoThreads) :
fBytesTx(0),
fBytesRx(0),
fMessagesTx(0),
@@ -21,6 +21,10 @@ FairMQSocketNN::FairMQSocketNN(const string& type, int num) :
id << type << "." << num;
fId = id.str();
if ( numIoThreads > 1 ) {
LOG(INFO) << "number of I/O threads is not used in nanomsg";
}
fSocket = nn_socket (AF_SP, GetConstant(type));
if (type == "sub") {
nn_setsockopt(fSocket, NN_SUB, NN_SUB_SUBSCRIBE, NULL, 0);