#include <WFMO_Reactor.h>
Inheritance diagram for ACE_WFMO_Reactor_Notify
Public Methods | |
ACE_WFMO_Reactor_Notify (void) | |
Constructor. | |
virtual int | open (ACE_Reactor_Impl *wfmo_reactor, ACE_Timer_Queue *timer_queue, int disable_notify = 0) |
Initialization. <timer_queue> is stored to call <gettimeofday>. | |
virtual int | close (void) |
No-op. | |
ssize_t | notify (ACE_Event_Handler *event_handler = 0, ACE_Reactor_Mask mask = ACE_Event_Handler::EXCEPT_MASK, ACE_Time_Value *timeout = 0) |
virtual int | dispatch_notifications (int &number_of_active_handles, ACE_Handle_Set &rd_mask) |
No-op. | |
virtual ACE_HANDLE | get_handle (void) const |
Returns a handle to the . | |
virtual ACE_HANDLE | notify_handle (void) |
Returns the ACE_HANDLE of the notify pipe on which the reactor is listening for notifications so that other threads can unblock the <Reactor_Impl>. | |
virtual int | dispatch_notify (ACE_Notification_Buffer &buffer) |
Handle one of the notify call on the <handle>. This could be because of a thread trying to unblock the <Reactor_Impl>. | |
virtual int | is_dispatchable (ACE_Notification_Buffer &buffer) |
Verify whether the buffer has dispatchable info or not. | |
virtual int | read_notify_pipe (ACE_HANDLE handle, ACE_Notification_Buffer &buffer) |
Read one of the notify call on the <handle> into the <buffer>. This could be because of a thread trying to unblock the <Reactor_Impl>. | |
void | max_notify_iterations (int) |
int | max_notify_iterations (void) |
virtual int | purge_pending_notifications (ACE_Event_Handler *, ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK) |
virtual void | dump (void) const |
Dump the state of an object. | |
Private Methods | |
virtual int | handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0) |
Private Attributes | |
ACE_Timer_Queue* | timer_queue_ |
Pointer to the wfmo_reactor's timer queue. | |
ACE_Auto_Event | wakeup_one_thread_ |
An auto event is used so that we can <signal> it to wakeup one thread up (e.g., when the <notify> method is called). | |
ACE_Message_Queue<ACE_MT_SYNCH> | message_queue_ |
int | max_notify_iterations_ |
This implementation is necessary for cases where the is run in a multi-threaded program. In this case, we need to be able to unblock <WaitForMultipleObjects> when updates occur other than in the main thread. To do this, we signal an auto-reset event the is listening on. If an and is passed to <notify>, the appropriate <handle_*> method is dispatched.
|
Constructor.
|
|
No-op.
Reimplemented from ACE_Reactor_Notify. |
|
No-op.
Reimplemented from ACE_Reactor_Notify. |
|
Handle one of the notify call on the <handle>. This could be because of a thread trying to unblock the <Reactor_Impl>.
Reimplemented from ACE_Reactor_Notify. |
|
Dump the state of an object.
Reimplemented from ACE_Reactor_Notify. |
|
Returns a handle to the .
Reimplemented from ACE_Event_Handler. |
|
Called when the notification event waited on by is signaled. This dequeues all pending and dispatches them. Reimplemented from ACE_Event_Handler. |
|
Verify whether the buffer has dispatchable info or not.
Reimplemented from ACE_Reactor_Notify. |
|
Get the maximum number of times that the method will iterate and dispatch the that are passed in via the notify queue before breaking out of its loop. Reimplemented from ACE_Reactor_Notify. |
|
Set the maximum number of times that the method will iterate and dispatch the that are passed in via the notify queue before breaking out of its loop. By default, this is set to -1, which means "iterate until the queue is empty." Setting this to a value like "1 or 2" will increase "fairness" (and thus prevent starvation) at the expense of slightly higher dispatching overhead. Reimplemented from ACE_Reactor_Notify. |
|
Special trick to unblock <WaitForMultipleObjects> when updates occur. All we do is enqueue <event_handler> and <mask> onto the and wakeup the <WFMO_Reactor> by signaling its handle. The indicates how long to blocking trying to notify the <WFMO_Reactor>. If <timeout> == 0, the caller will block until action is possible, else will wait until the relative time specified in <timeout> elapses). Reimplemented from ACE_Reactor_Notify. |
|
Returns the ACE_HANDLE of the notify pipe on which the reactor is listening for notifications so that other threads can unblock the <Reactor_Impl>.
Reimplemented from ACE_Reactor_Notify. |
|
Initialization. <timer_queue> is stored to call <gettimeofday>.
Reimplemented from ACE_Reactor_Notify. |
|
Purge any notifications pending in this reactor for the specified object. If <eh> == 0, all notifications for all handlers are removed (but not any notifications posted just to wake up the reactor itself). Returns the number of notifications purged. Returns -1 on error. Reimplemented from ACE_Reactor_Notify. |
|
Read one of the notify call on the <handle> into the <buffer>. This could be because of a thread trying to unblock the <Reactor_Impl>.
Reimplemented from ACE_Reactor_Notify. |
|
Keeps track of the maximum number of times that the method will iterate and dispatch the that are passed in via the notify queue before breaking out of its loop. By default, this is set to -1, which means "iterate until the queue is empty." |
|
|
|
Pointer to the wfmo_reactor's timer queue.
|
|
An auto event is used so that we can <signal> it to wakeup one thread up (e.g., when the <notify> method is called).
|