summaryrefslogtreecommitdiff
path: root/ace/Timer_Queue.h
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-22 08:15:21 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-04-22 08:15:21 +0000
commit69ece2d7d2b032c8ef6f827723874fb11b3b6ba7 (patch)
treeaff461430c99ded6240bc5cd2572d3c1c31e94c3 /ace/Timer_Queue.h
parent9f66663966051d24f2b41daca601ea0f19a52dce (diff)
downloadATCD-69ece2d7d2b032c8ef6f827723874fb11b3b6ba7.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Timer_Queue.h')
-rw-r--r--ace/Timer_Queue.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/ace/Timer_Queue.h b/ace/Timer_Queue.h
index cdf0ee9ef9d..6c5fa062020 100644
--- a/ace/Timer_Queue.h
+++ b/ace/Timer_Queue.h
@@ -97,6 +97,9 @@ public:
// seen, else 1.
};
+// Forward declaration.
+class ACE_Upcall_Strategy;
+
class ACE_Export ACE_Timer_Queue
// = TITLE
// Provides an interface to timers.
@@ -108,8 +111,10 @@ class ACE_Export ACE_Timer_Queue
{
public:
// = Initialization and termination methods.
- ACE_Timer_Queue (void);
- // Default constructor.
+ ACE_Timer_Queue (ACE_Upcall_Strategy *upcall_strategy = 0);
+ // Default constructor. <expire> will call <upcall_strategy->upcall>
+ // if <upcall_strategy> is not 0. Else it will call <handle_timeout>
+ // on the <Event_Handler>
virtual ~ACE_Timer_Queue (void);
// Destructor - make virtual for proper destruction of inherited
@@ -187,6 +192,11 @@ public:
void timer_skew (const ACE_Time_Value &skew);
const ACE_Time_Value &timer_skew (void) const;
+#if defined (ACE_MT_SAFE)
+ ACE_Recursive_Thread_Mutex &lock (void);
+ // Synchronization variable used by the queue
+#endif /* ACE_MT_SAFE */
+
virtual void dump (void) const;
// Dump the state of an object.
@@ -194,6 +204,13 @@ public:
// Declare the dynamic allocation hooks.
protected:
+
+ virtual void upcall (ACE_Event_Handler *handler,
+ const void *arg,
+ const ACE_Time_Value &cur_time);
+ // This method will call <handle_timeout> on the <handler> or will
+ // forward the parameters to an upcall strategy (if one is present)
+
virtual void reschedule (ACE_Timer_Node *) = 0;
// Reschedule an "interval" <ACE_Timer_Node>.
@@ -214,6 +231,9 @@ protected:
ACE_Time_Value (*gettimeofday_)(void);
// Pointer to function that returns the current time of day.
+ ACE_Upcall_Strategy *upcall_strategy_;
+ // Upcall Strategy for callbacks
+
private:
ACE_Time_Value timeout_;
// Returned by <calculate_timeout>.