1 #ifndef FWCore_SharedMemory_WorkerChannel_h
2 #define FWCore_SharedMemory_WorkerChannel_h
23 #include "boost/interprocess/managed_shared_memory.hpp"
24 #include "boost/interprocess/sync/named_mutex.hpp"
25 #include "boost/interprocess/sync/named_condition.hpp"
26 #include "boost/interprocess/sync/scoped_lock.hpp"
34 namespace edm::shared_memory {
48 boost::interprocess::scoped_lock<boost::interprocess::named_mutex>*
accessLock() {
return &
lock_; }
109 boost::interprocess::scoped_lock<boost::interprocess::named_mutex>
lock_;
void shouldKeepEvent(bool iChoice)
call this from the handleTransitions functor
WorkerChannel(std::string const &iName, const std::string &iUniqueID)
edm::Transition * transitionType_
boost::interprocess::scoped_lock< boost::interprocess::named_mutex > * accessLock()
the lock is made accessible so that the WorkerMonitorThread can be used to unlock it in the event of ...
void handleTransitions(F &&iF)
boost::interprocess::managed_shared_memory managed_shm_
void notifyController()
These are here for expert use.
unsigned long long * transitionID_
const WorkerChannel & operator=(const WorkerChannel &)=delete
edm::Transition transition() const noexcept
BufferInfo * toWorkerBufferInfo()
This can be used with ReadBuffer to keep Controller and Worker in sync.
BufferInfo * toWorkerBufferInfo_
void workerSetupDone()
Matches the ControllerChannel::setupWorker call.
BufferInfo * fromWorkerBufferInfo_
BufferInfo * fromWorkerBufferInfo()
This can be used with WriteBuffer to keep Controller and Worker in sync.
unsigned long long transitionID() const noexcept
boost::interprocess::named_condition cndFromController_
boost::interprocess::scoped_lock< boost::interprocess::named_mutex > lock_
bool stopRequested() const noexcept
boost::interprocess::named_condition cndToController_
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
boost::interprocess::named_mutex mutex_