diff --git a/examples/multiple-channels/Sampler.cxx b/examples/multiple-channels/Sampler.cxx index ec22d958..d2f74c04 100644 --- a/examples/multiple-channels/Sampler.cxx +++ b/examples/multiple-channels/Sampler.cxx @@ -41,7 +41,7 @@ void Sampler::Run() { FairMQPollerPtr poller(NewPoller("data", "broadcast")); - while (CheckCurrentState(RUNNING)) + while (!NewStatePending()) { poller->Poll(100); diff --git a/examples/multiple-transports/Sampler1.cxx b/examples/multiple-transports/Sampler1.cxx index 67274ef5..06959f75 100644 --- a/examples/multiple-transports/Sampler1.cxx +++ b/examples/multiple-transports/Sampler1.cxx @@ -60,7 +60,7 @@ void Sampler1::ListenForAcks() { uint64_t numAcks = 0; - while (CheckCurrentState(RUNNING)) + while (!NewStatePending()) { FairMQMessagePtr ack(NewMessageFor("ack", 0)); if (Receive(ack, "ack") < 0) diff --git a/examples/region/Sink.cxx b/examples/region/Sink.cxx index e4ff0a7d..55c1c04b 100644 --- a/examples/region/Sink.cxx +++ b/examples/region/Sink.cxx @@ -35,7 +35,7 @@ void Sink::Run() { FairMQChannel& dataInChannel = fChannels.at("data").at(0); - while (CheckCurrentState(RUNNING)) + while (!NewStatePending()) { FairMQMessagePtr msg(dataInChannel.Transport()->CreateMessage()); dataInChannel.Receive(msg); diff --git a/fairmq/devices/FairMQBenchmarkSampler.cxx b/fairmq/devices/FairMQBenchmarkSampler.cxx index 08082642..28b93e90 100644 --- a/fairmq/devices/FairMQBenchmarkSampler.cxx +++ b/fairmq/devices/FairMQBenchmarkSampler.cxx @@ -54,7 +54,7 @@ void FairMQBenchmarkSampler::Run() fair::mq::tools::RateLimiter rateLimiter(fMsgRate); - while (CheckCurrentState(RUNNING)) + while (!NewStatePending()) { if (fMultipart) { diff --git a/fairmq/devices/FairMQMerger.cxx b/fairmq/devices/FairMQMerger.cxx index e0c0a3be..145b7ceb 100644 --- a/fairmq/devices/FairMQMerger.cxx +++ b/fairmq/devices/FairMQMerger.cxx @@ -60,7 +60,7 @@ void FairMQMerger::Run() if (fMultipart) { - while (CheckCurrentState(RUNNING)) + while (!NewStatePending()) { poller->Poll(100); @@ -91,7 +91,7 @@ void FairMQMerger::Run() } else { - while (CheckCurrentState(RUNNING)) + while (!NewStatePending()) { poller->Poll(100); diff --git a/fairmq/devices/FairMQProxy.cxx b/fairmq/devices/FairMQProxy.cxx index df3b6e09..6a47b1e8 100644 --- a/fairmq/devices/FairMQProxy.cxx +++ b/fairmq/devices/FairMQProxy.cxx @@ -41,7 +41,7 @@ void FairMQProxy::Run() { if (fMultipart) { - while (CheckCurrentState(RUNNING)) + while (!NewStatePending()) { FairMQParts payload; if (Receive(payload, fInChannelName) >= 0) @@ -61,7 +61,7 @@ void FairMQProxy::Run() } else { - while (CheckCurrentState(RUNNING)) + while (!NewStatePending()) { unique_ptr payload(fTransportFactory->CreateMessage()); if (Receive(payload, fInChannelName) >= 0) diff --git a/fairmq/plugins/PMIx/PMIx.hpp b/fairmq/plugins/PMIx/PMIx.hpp index e42d0d49..1865ba4c 100644 --- a/fairmq/plugins/PMIx/PMIx.hpp +++ b/fairmq/plugins/PMIx/PMIx.hpp @@ -134,6 +134,11 @@ struct info : pmix_info_t throw runtime_error("pmix::info ctor failed: rc=" + std::to_string(rc)); } } + + friend std::ostream& operator<<(std::ostream& os, const info& p) + { + return os << "key=" << p.key << ",value='" << p.value.data.string << "'"; + } }; struct pdata : pmix_pdata_t