Public Member Functions
|Pre-allocate resources in the queue. |
|Release all resources in the queue. |
|int||purge_pending_notifications (ACE_Event_Handler *eh, ACE_Reactor_Mask mask)|
|Remove all elements in the queue matching |
|int||push_new_notification (ACE_Notification_Buffer const &buffer)|
|Add a new notification to the queue. |
|int||pop_next_notification (ACE_Notification_Buffer ¤t, bool &more_messages_queued, ACE_Notification_Buffer &next)|
|Extract the next notification from the queue. |
< ACE_Notification_Queue_Node >
Private Member Functions
|Allocate more memory for the queue. |
< ACE_Notification_Queue_Node * >
|Keeps track of all pending notifications. |
|Keeps track of all free buffers. |
|Synchronization for handling of queues. |
The ACE_Reactor uses a pipe to send wake up the thread running the event loop from other threads. This pipe can be limited in size under some operating systems. For some applications, this limit presents a problem. A user-space notification queue is used to overcome those limitations. The queue tries to use as few resources on the pipe as possible, while keeping all the data in user space.
This code was refactored from Select_Reactor_Base.
|typedef ACE_Intrusive_List<ACE_Notification_Queue_Node> ACE_Notification_Queue::Buffer_List
Allocate more memory for the queue.
Pre-allocate resources in the queue.
|int ACE_Notification_Queue::pop_next_notification||(||ACE_Notification_Buffer &||current,|
Extract the next notification from the queue.
|int ACE_Notification_Queue::purge_pending_notifications||(||ACE_Event_Handler *||eh,|
Remove all elements in the queue matching
I suggest reading the documentation in ACE_Reactor to find a more detailed description. This is just a helper function.
|int ACE_Notification_Queue::push_new_notification||(||ACE_Notification_Buffer const &||buffer||)|
Add a new notification to the queue.
Release all resources in the queue.
Keeps track of allocated arrays of type ACE_Notification_Buffer. The idea is to amortize allocation costs by allocating multiple ACE_Notification_Buffer objects at a time.
Keeps track of all free buffers.
Keeps track of all pending notifications.
Synchronization for handling of queues.