summaryrefslogtreecommitdiff
path: root/ACE/ace/Proactor.h
diff options
context:
space:
mode:
authormcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-12-15 11:09:41 +0000
committermcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2011-12-15 11:09:41 +0000
commit9d1004206324867a4287e99b9675d24e536fa090 (patch)
tree89d59383f294627917ee3cf054f347884a914f32 /ACE/ace/Proactor.h
parentb8d69007a4e25977f11cc3de8eb3793c0c61161a (diff)
downloadATCD-9d1004206324867a4287e99b9675d24e536fa090.tar.gz
Thu Dec 15 11:00:00 UTC 2011 Martin Corino <mcorino@remedy.nl>
Merged timer_policy branch.
Diffstat (limited to 'ACE/ace/Proactor.h')
-rw-r--r--ACE/ace/Proactor.h46
1 files changed, 17 insertions, 29 deletions
diff --git a/ACE/ace/Proactor.h b/ACE/ace/Proactor.h
index 18f2c2c0e27..13a90203f0c 100644
--- a/ACE/ace/Proactor.h
+++ b/ACE/ace/Proactor.h
@@ -43,6 +43,9 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Proactor_Impl;
class ACE_Proactor_Timer_Handler;
+/// Type def for the timer queue.
+typedef ACE_Abstract_Timer_Queue<ACE_Handler *> ACE_Proactor_Timer_Queue;
+
/**
* @class ACE_Proactor_Handle_Timeout_Upcall
*
@@ -51,15 +54,8 @@ class ACE_Proactor_Timer_Handler;
* This class implements the functor required by the Timer
* Queue to call <handle_timeout> on ACE_Handlers.
*/
-class ACE_Proactor_Handle_Timeout_Upcall
+class ACE_Export ACE_Proactor_Handle_Timeout_Upcall
{
-
- /// Type def for the timer queue.
- typedef ACE_Timer_Queue_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_QUEUE;
-
/// The main Proactor class has special permissions.
friend class ACE_Proactor;
@@ -68,12 +64,12 @@ public:
ACE_Proactor_Handle_Timeout_Upcall (void);
/// This method is called when a timer is registered.
- int registration (TIMER_QUEUE &timer_queue,
+ int registration (ACE_Proactor_Timer_Queue &timer_queue,
ACE_Handler *handler,
const void *arg);
/// This method is called before the timer expires.
- int preinvoke (TIMER_QUEUE &timer_queue,
+ int preinvoke (ACE_Proactor_Timer_Queue &timer_queue,
ACE_Handler *handler,
const void *arg,
int recurring_timer,
@@ -81,14 +77,14 @@ public:
const void *&upcall_act);
/// This method is called when the timer expires.
- int timeout (TIMER_QUEUE &timer_queue,
+ int timeout (ACE_Proactor_Timer_Queue &timer_queue,
ACE_Handler *handler,
const void *arg,
int recurring_timer,
const ACE_Time_Value &cur_time);
/// This method is called after the timer expires.
- int postinvoke (TIMER_QUEUE &timer_queue,
+ int postinvoke (ACE_Proactor_Timer_Queue &timer_queue,
ACE_Handler *handler,
const void *arg,
int recurring_timer,
@@ -96,20 +92,20 @@ public:
const void *upcall_act);
/// This method is called when a handler is canceled.
- int cancel_type (TIMER_QUEUE &timer_queue,
+ int cancel_type (ACE_Proactor_Timer_Queue &timer_queue,
ACE_Handler *handler,
int dont_call_handle_close,
int &requires_reference_counting);
/// This method is called when a timer is canceled.
- int cancel_timer (TIMER_QUEUE &timer_queue,
+ int cancel_timer (ACE_Proactor_Timer_Queue &timer_queue,
ACE_Handler *handler,
int dont_call_handle_close,
int requires_reference_counting);
/// This method is called when the timer queue is destroyed and the
/// timer is still contained in it.
- int deletion (TIMER_QUEUE &timer_queue,
+ int deletion (ACE_Proactor_Timer_Queue &timer_queue,
ACE_Handler *handler,
const void *arg);
@@ -135,10 +131,8 @@ class ACE_Export ACE_Proactor
{
// = Here are the private typedefs that the ACE_Proactor uses.
- typedef ACE_Timer_Queue_Iterator_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_QUEUE_ITERATOR;
+ typedef ACE_Timer_Queue_Iterator_T<ACE_Handler *>
+ TIMER_QUEUE_ITERATOR;
typedef ACE_Timer_List_T<ACE_Handler *,
ACE_Proactor_Handle_Timeout_Upcall,
ACE_SYNCH_RECURSIVE_MUTEX>
@@ -171,12 +165,6 @@ class ACE_Export ACE_Proactor
friend class ACE_Proactor_Timer_Handler;
public:
- /// Public type.
- typedef ACE_Timer_Queue_T<ACE_Handler *,
- ACE_Proactor_Handle_Timeout_Upcall,
- ACE_SYNCH_RECURSIVE_MUTEX>
- TIMER_QUEUE;
-
/**
* Constructor. If @a implementation is 0, the correct implementation
* object will be created. @a delete_implementation flag determines
@@ -185,7 +173,7 @@ public:
*/
ACE_Proactor (ACE_Proactor_Impl *implementation = 0,
bool delete_implementation = false,
- TIMER_QUEUE *tq = 0);
+ ACE_Proactor_Timer_Queue *tq = 0);
/// Destruction.
~ACE_Proactor (void);
@@ -383,10 +371,10 @@ public:
void number_of_threads (size_t threads);
/// Get timer queue.
- TIMER_QUEUE *timer_queue (void) const;
+ ACE_Proactor_Timer_Queue *timer_queue (void) const;
/// Set timer queue.
- void timer_queue (TIMER_QUEUE *timer_queue);
+ void timer_queue (ACE_Proactor_Timer_Queue *timer_queue);
/**
* Get the event handle.
@@ -614,7 +602,7 @@ protected:
ACE_Thread_Manager thr_mgr_;
/// Timer Queue.
- TIMER_QUEUE *timer_queue_;
+ ACE_Proactor_Timer_Queue *timer_queue_;
/// Flag on whether to delete the timer queue.
int delete_timer_queue_;