#include <WorkerChannel.h>
Public Member Functions | |
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 a unix signal More... | |
BufferInfo * | fromWorkerBufferInfo () |
This can be used with WriteBuffer to keep Controller and Worker in sync. More... | |
template<typename F > | |
void | handleTransitions (F &&iF) |
void | notifyController () |
These are here for expert use. More... | |
const WorkerChannel & | operator= (const WorkerChannel &)=delete |
const WorkerChannel & | operator= (WorkerChannel &&)=delete |
void | shouldKeepEvent (bool iChoice) |
call this from the handleTransitions functor More... | |
bool | stopRequested () const noexcept |
BufferInfo * | toWorkerBufferInfo () |
This can be used with ReadBuffer to keep Controller and Worker in sync. More... | |
edm::Transition | transition () const noexcept |
unsigned long long | transitionID () const noexcept |
void | waitForController () |
WorkerChannel (std::string const &iName, const std::string &iUniqueID) | |
WorkerChannel (const WorkerChannel &)=delete | |
WorkerChannel (WorkerChannel &&)=delete | |
void | workerSetupDone () |
Matches the ControllerChannel::setupWorker call. More... | |
Private Attributes | |
boost::interprocess::named_condition | cndFromController_ |
boost::interprocess::named_condition | cndToController_ |
BufferInfo * | fromWorkerBufferInfo_ |
bool * | keepEvent_ |
boost::interprocess::scoped_lock< boost::interprocess::named_mutex > | lock_ |
boost::interprocess::managed_shared_memory | managed_shm_ |
boost::interprocess::named_mutex | mutex_ |
bool * | stop_ |
BufferInfo * | toWorkerBufferInfo_ |
unsigned long long * | transitionID_ |
edm::Transition * | transitionType_ |
Definition at line 35 of file WorkerChannel.h.
WorkerChannel::WorkerChannel | ( | std::string const & | iName, |
const std::string & | iUniqueID | ||
) |
iName must match the value from ControllerChannel::sharedMemoryName() iUniqueName must match the value from ControllerChannel::uniqueID()
Definition at line 40 of file WorkerChannel.cc.
References cndFromController_, cndToController_, edm::first(), fromWorkerBufferInfo_, edm::shared_memory::channel_names::kConditionFromMain, edm::shared_memory::channel_names::kConditionToMain, keepEvent_, edm::shared_memory::channel_names::kFromWorkerBufferInfo, edm::shared_memory::channel_names::kKeepEvent, edm::shared_memory::channel_names::kMutex, edm::shared_memory::channel_names::kStop, edm::shared_memory::channel_names::kToWorkerBufferInfo, edm::shared_memory::channel_names::kTransitionID, edm::shared_memory::channel_names::kTransitionType, lock_, managed_shm_, mutex_, stop_, toWorkerBufferInfo_, transitionID_, and transitionType_.
|
delete |
|
delete |
|
inline |
the lock is made accessible so that the WorkerMonitorThread can be used to unlock it in the event of a unix signal
Definition at line 48 of file WorkerChannel.h.
References lock_.
Referenced by main().
|
inline |
This can be used with WriteBuffer to keep Controller and Worker in sync.
Definition at line 53 of file WorkerChannel.h.
References fromWorkerBufferInfo_.
Referenced by main().
|
inline |
Matches the ControllerChannel::doTransition calls. iF is a function that takes as arguments a edm::Transition and unsigned long long
Definition at line 65 of file WorkerChannel.h.
References notifyController(), stopRequested(), transition(), transitionID(), and waitForController().
Referenced by main().
|
inline |
These are here for expert use.
Definition at line 84 of file WorkerChannel.h.
References cndToController_, and transitionID_.
Referenced by handleTransitions(), and workerSetupDone().
|
delete |
|
delete |
|
inline |
call this from the handleTransitions
functor
Definition at line 81 of file WorkerChannel.h.
References keepEvent_.
|
inlinenoexcept |
|
inline |
This can be used with ReadBuffer to keep Controller and Worker in sync.
Definition at line 51 of file WorkerChannel.h.
References toWorkerBufferInfo_.
Referenced by main().
|
inlinenoexcept |
Definition at line 92 of file WorkerChannel.h.
References transitionType_.
Referenced by handleTransitions().
|
inlinenoexcept |
Definition at line 93 of file WorkerChannel.h.
References transitionID_.
Referenced by handleTransitions().
|
inline |
Definition at line 89 of file WorkerChannel.h.
References cndFromController_, and lock_.
Referenced by handleTransitions().
|
inline |
Matches the ControllerChannel::setupWorker call.
Definition at line 56 of file WorkerChannel.h.
References notifyController().
Referenced by main().
|
private |
Definition at line 101 of file WorkerChannel.h.
Referenced by waitForController(), and WorkerChannel().
|
private |
Definition at line 107 of file WorkerChannel.h.
Referenced by notifyController(), and WorkerChannel().
|
private |
Definition at line 106 of file WorkerChannel.h.
Referenced by fromWorkerBufferInfo(), and WorkerChannel().
|
private |
Definition at line 108 of file WorkerChannel.h.
Referenced by shouldKeepEvent(), and WorkerChannel().
|
private |
Definition at line 109 of file WorkerChannel.h.
Referenced by accessLock(), waitForController(), and WorkerChannel().
|
private |
Definition at line 98 of file WorkerChannel.h.
Referenced by WorkerChannel().
|
private |
Definition at line 100 of file WorkerChannel.h.
Referenced by WorkerChannel().
|
private |
Definition at line 102 of file WorkerChannel.h.
Referenced by stopRequested(), and WorkerChannel().
|
private |
Definition at line 105 of file WorkerChannel.h.
Referenced by toWorkerBufferInfo(), and WorkerChannel().
|
private |
Definition at line 104 of file WorkerChannel.h.
Referenced by notifyController(), transitionID(), and WorkerChannel().
|
private |
Definition at line 103 of file WorkerChannel.h.
Referenced by transition(), and WorkerChannel().