mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
FairMQ: Introduce callbacks for the FairMQUnmanagedRegion.
Callbacks are called when the data buffer of the message assiciated with the corresponding region is no longer needed by the transport. Example in examples/advanced/Region/
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#define FAIRMQEXAMPLEREGIONSAMPLER_H_
|
||||
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
|
||||
#include "FairMQDevice.h"
|
||||
|
||||
@@ -26,10 +27,14 @@ class FairMQExampleRegionSampler : public FairMQDevice
|
||||
virtual ~FairMQExampleRegionSampler();
|
||||
|
||||
protected:
|
||||
int fMsgSize;
|
||||
|
||||
virtual void InitTask();
|
||||
virtual void Run();
|
||||
virtual bool ConditionalRun();
|
||||
virtual void ResetTask();
|
||||
|
||||
private:
|
||||
int fMsgSize;
|
||||
FairMQUnmanagedRegionPtr fRegion;
|
||||
std::atomic<uint64_t> fNumUnackedMsgs;
|
||||
};
|
||||
|
||||
#endif /* FAIRMQEXAMPLEREGIONSAMPLER_H_ */
|
||||
|
Reference in New Issue
Block a user