ACE 7.1.4
|
A Handler for timer. It helps in the management of timers registered with the Proactor. More...
Protected Member Functions | |
int | svc () override |
![]() | |
ACE_Event_Handler (ACE_Reactor *=nullptr, int priority=ACE_Event_Handler::LO_PRIORITY) | |
Force ACE_Event_Handler to be an abstract base class. | |
Protected Attributes | |
ACE_Auto_Event | timer_event_ |
Event to wait on. | |
ACE_Proactor & | proactor_ |
Proactor. | |
int | shutting_down_ |
Flag used to indicate when we are shutting down. | |
![]() | |
size_t | thr_count_ |
ACE_Thread_Manager * | thr_mgr_ |
Multi-threading manager. | |
u_long | flags_ |
ACE_Task flags. | |
int | grp_id_ |
This maintains the group id of the Task. | |
ACE_thread_t | last_thread_id_ |
Holds the thread ID of the last thread to exit svc() in this object. | |
![]() | |
Atomic_Reference_Count | reference_count_ |
Reference count. | |
Additional Inherited Members | |
![]() | |
enum | { LO_PRIORITY = 0 , HI_PRIORITY = 10 , NULL_MASK = 0 , READ_MASK = (1 << 0) , WRITE_MASK = (1 << 1) , EXCEPT_MASK = (1 << 2) , ACCEPT_MASK = (1 << 3) , CONNECT_MASK = (1 << 4) , TIMER_MASK = (1 << 5) , QOS_MASK = (1 << 6) , GROUP_QOS_MASK = (1 << 7) , SIGNAL_MASK = (1 << 8) , ALL_EVENTS_MASK , RWE_MASK , DONT_CALL = (1 << 9) } |
enum | { ACE_EVENT_HANDLER_NOT_RESUMED = -1 , ACE_REACTOR_RESUMES_HANDLER = 0 , ACE_APPLICATION_RESUMES_HANDLER } |
typedef long | Reference_Count |
Reference count type. | |
![]() | |
static ACE_THR_FUNC_RETURN | svc_run (void *) |
Routine that runs the service routine as a daemon thread. | |
static void | cleanup (void *object, void *params) |
![]() | |
static ACE_THR_FUNC_RETURN | read_adapter (void *event_handler) |
static int | register_stdin_handler (ACE_Event_Handler *eh, ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr, int flags=THR_DETACHED) |
static int | remove_stdin_handler (ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr) |
Performs the inverse of the register_stdin_handler() method. | |
![]() | |
ACE_Message_Queue< ACE_SYNCH_USE, ACE_System_Time_Policy > * | msg_queue_ |
Queue of messages on the ACE_Task.. | |
bool | delete_msg_queue_ |
true if should delete Message_Queue, false otherwise. | |
ACE_Module< ACE_SYNCH_USE, ACE_System_Time_Policy > * | mod_ |
Back-pointer to the enclosing module. | |
ACE_Task< ACE_SYNCH_USE, ACE_System_Time_Policy > * | next_ |
Pointer to adjacent ACE_Task. | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
![]() | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
![]() | |
typedef std::atomic< Reference_Count > | Atomic_Reference_Count |
Typedef for implementation of reference counting. | |
A Handler for timer. It helps in the management of timers registered with the Proactor.
This object has a thread that will wait on the earliest time in a list of timers and an event. When a timer expires, the thread will post a completion event on the port and go back to waiting on the timer queue and event. If the event is signaled, the thread will refresh the time it is currently waiting on (in case the earliest time has changed).
|
explicit |
Constructor.
|
override |
Destructor.
int ACE_Proactor_Timer_Handler::destroy | ( | ) |
Proactor calls this to shut down the timer handler gracefully. Just calling the destructor alone doesnt do what <destroy> does. <destroy> make sure the thread exits properly.
int ACE_Proactor_Timer_Handler::signal | ( | ) |
Proactor calls this to refresh the timer event thread, to wake up the thread from a sleep. This is needed to make the thread recompute its sleep time after changes to the timer queue.
|
overrideprotectedvirtual |
Run by a daemon thread to handle deferred processing. In other words, this method will do the waiting on the earliest timer and event.
Reimplemented from ACE_Task_Base.
|
protected |
Proactor.
|
protected |
Flag used to indicate when we are shutting down.
|
protected |
Event to wait on.