OpenDDS
Snapshot(2023/04/07-19:43)
|
Send thread synchronization utilizing a reactor. More...
#include <ReactorSynch.h>
Public Member Functions | |
ReactorSynch (ThreadSynchResource *synch_resource, TransportSendStrategy *strategy, ACE_Reactor *reactor) | |
virtual | ~ReactorSynch () |
virtual void | work_available () |
![]() | |
virtual | ~ThreadSynch () |
int | register_worker (ThreadSynchWorker &worker) |
void | unregister_worker () |
Our owner, the worker_, is breaking our relationship. More... | |
Private Attributes | |
ScheduleOutputHandler * | scheduleOutputHandler_ |
Notification event handler. More... | |
ACE_Event_Handler_var | safeHandler_ |
Memory management using the provided (kluge) var type. More... | |
Additional Inherited Members | |
![]() | |
ThreadSynch (ThreadSynchResource *resource) | |
int | wait_on_clogged_resource () |
virtual int | register_worker_i () |
virtual void | unregister_worker_i () |
WeakRcHandle< ThreadSynchWorker > | worker () |
Access the worker implementation directly. More... | |
Send thread synchronization utilizing a reactor.
This class implements sending thread synchronization by scheduling qeueued data sending to be handled by a reactor. The initial implementation will share the TransportReactorTask reactor for all sending threads; which means that all receiving and queued sends will be sharing the same thread. Or thread pool.
Calls to enable and disable sending on queued data by the reactor are scheduled to be enabled and disabled on the reactor by notifying the reactor to make the update. This ensures that no locks will be held (other than the Reactor::token_) when the call into the reactor is made.
References to the containing TransportSendStrategy and the reactor are held as raw pointers since they are guaranteed to be valid for the lifetime of this object (this is held in the same containing object).
Definition at line 39 of file ReactorSynch.h.
ACE_INLINE OpenDDS::DCPS::ReactorSynch::ReactorSynch | ( | ThreadSynchResource * | synch_resource, |
TransportSendStrategy * | strategy, | ||
ACE_Reactor * | reactor | ||
) |
Construct with raw pointers from the containing TransportSendStrategy.
Definition at line 12 of file ReactorSynch.inl.
References ACE_DEBUG, ACE_TEXT(), DBG_ENTRY_LVL, OpenDDS::DCPS::DCPS_debug_level, LM_DEBUG, safeHandler_, scheduleOutputHandler_, and OpenDDS::DCPS::ThreadSynch::worker().
|
virtual |
Definition at line 16 of file ReactorSynch.cpp.
References ACE_DEBUG, ACE_TEXT(), DBG_ENTRY_LVL, OpenDDS::DCPS::DCPS_debug_level, LM_DEBUG, scheduleOutputHandler_, and OpenDDS::DCPS::ThreadSynch::worker().
|
virtual |
The ThreadSynchWorker would like to have its perform_work() called from the appropriate thread once the ThreadSynchResource claims that it is_ready_for_work().
Implements OpenDDS::DCPS::ThreadSynch.
Definition at line 38 of file ReactorSynch.cpp.
References DBG_ENTRY_LVL, OpenDDS::DCPS::ScheduleOutputHandler::schedule_output(), and scheduleOutputHandler_.
|
private |
Memory management using the provided (kluge) var type.
Definition at line 56 of file ReactorSynch.h.
Referenced by ReactorSynch().
|
private |
Notification event handler.
Definition at line 53 of file ReactorSynch.h.
Referenced by ReactorSynch(), work_available(), and ~ReactorSynch().