Skip to content

Commit

Permalink
Using FairMQChannel::Send instead of SendAsync which is deprecated
Browse files Browse the repository at this point in the history
FairMQ is going to deprecate the asyncronous version of Send and Receive,
following the suggestion in the warning, Send is used now.
"For non-blocking Send, use timeout version with timeout of 0"
  • Loading branch information
matthiasrichter committed Nov 13, 2018
1 parent eba9e30 commit 8665dc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Utilities/QC/QCMerger/src/MergerDevice.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ size_t MergerDevice::sendMergedObjectToViewer(TObject* dataObject)
unique_ptr<FairMQMessage> viewerRequest(fTransportFactory->CreateMessage(
viewerMessage->Buffer(), viewerMessage->BufferSize(), deleteTMessage, viewerMessage));
size_t messageSize = viewerRequest->GetSize();
if ((respondeCode = fChannels.at("data-out").at(0).SendAsync(viewerRequest)) == -2) {
if ((respondeCode = fChannels.at("data-out").at(0).SendAsync(viewerRequest)) == -2) {
if ((respondeCode = fChannels.at("data-out").at(0).Send(viewerRequest, 0)) == -2) {
if ((respondeCode = fChannels.at("data-out").at(0).Send(viewerRequest, 0)) == -2) {
mLastSendBufferOverloadTime = clock();
mSendBufferOverloaded = true;
LOG(DEBUG) << "Buffer of data-out channel is full. Waiting for free buffer...";

while ((respondeCode = fChannels.at("data-out").at(0).SendAsync(viewerRequest)) == -2) {
while ((respondeCode = fChannels.at("data-out").at(0).Send(viewerRequest, 0)) == -2) {
this_thread::sleep_for(chrono::milliseconds(10));
}

Expand Down

0 comments on commit 8665dc8

Please sign in to comment.