mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
FairMQ: Add hint argument to the region callback, settable per message.
This commit is contained in:
parent
37271e5840
commit
ccbbc9591d
|
@ -38,7 +38,7 @@ void FairMQExampleRegionSampler::InitTask()
|
|||
fRegion = FairMQUnmanagedRegionPtr(NewUnmanagedRegionFor("data",
|
||||
0,
|
||||
10000000,
|
||||
[this](void* data, size_t size) { // callback to be called when message buffers no longer needed by transport
|
||||
[this](void* data, size_t size, void* hint) { // callback to be called when message buffers no longer needed by transport
|
||||
--fNumUnackedMsgs;
|
||||
if (fMaxIterations > 0)
|
||||
{
|
||||
|
@ -54,8 +54,10 @@ bool FairMQExampleRegionSampler::ConditionalRun()
|
|||
0, // sub-channel
|
||||
fRegion, // region
|
||||
fRegion->GetData(), // ptr within region
|
||||
fMsgSize // offset from ptr
|
||||
fMsgSize, // offset from ptr
|
||||
nullptr // hint
|
||||
));
|
||||
|
||||
if (Send(msg, "data", 0) > 0)
|
||||
{
|
||||
++fNumUnackedMsgs;
|
||||
|
|
Loading…
Reference in New Issue
Block a user