diff options
author | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-04-05 18:26:47 +0000 |
---|---|---|
committer | alex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-04-05 18:26:47 +0000 |
commit | 80c9c09ce43eecd3f4817c17a288204cc4230458 (patch) | |
tree | f23d130d946716b25f0f8256352a0c65a1673a2f /ace/Proactor_Impl.h | |
parent | 373eace709bdc037ff58145579d720793cfbc0f9 (diff) | |
download | ATCD-80c9c09ce43eecd3f4817c17a288204cc4230458.tar.gz |
Completed Timers implementation for POSIX platforms. Timers
implementation is now common for POSIX and WIN32. Portable
ACE_Auto_Event is used in the aux thread to wait for the Timer
events.
The Timer's code in WIN32 has been removed and the common code exists
in Proactor.{h,cpp} only.
Diffstat (limited to 'ace/Proactor_Impl.h')
-rw-r--r-- | ace/Proactor_Impl.h | 52 |
1 files changed, 8 insertions, 44 deletions
diff --git a/ace/Proactor_Impl.h b/ace/Proactor_Impl.h index 31124ec071a..c962f21fe56 100644 --- a/ace/Proactor_Impl.h +++ b/ace/Proactor_Impl.h @@ -52,50 +52,6 @@ public: // This method adds the <handle> to the I/O completion port. This // function is a no-op function for Unix systems. - // = Timer management. - virtual long schedule_timer (ACE_Handler &handler, - const void *act, - const ACE_Time_Value &time) = 0; - // Schedule a <handler> that will expire after <time>. If it - // expires then <act> is passed in as the value to the <handler>'s - // <handle_timeout> callback method. This method returns a - // <timer_id>. This <timer_id> can be used to cancel a timer before - // it expires. The cancellation ensures that <timer_ids> are unique - // up to values of greater than 2 billion timers. As long as timers - // don't stay around longer than this there should be no problems - // with accidentally deleting the wrong timer. Returns -1 on - // failure (which is guaranteed never to be a valid <timer_id>. - - virtual long schedule_repeating_timer (ACE_Handler &handler, - const void *act, - const ACE_Time_Value &interval) = 0; - - // Same as above except <interval> it is used to reschedule the - // <handler> automatically. - - virtual long schedule_timer (ACE_Handler &handler, - const void *act, - const ACE_Time_Value &time, - const ACE_Time_Value &interval) = 0; - // This combines the above two methods into one. Mostly for backward - // compatibility. - - virtual int cancel_timer (ACE_Handler &handler, - int dont_call_handle_close) = 0; - // Cancel all timers associated with this <handler>. Returns number - // of timers cancelled. - - virtual int cancel_timer (long timer_id, - const void **act, - int dont_call_handle_close) = 0; - // Cancel the single <ACE_Handler> that matches the <timer_id> value - // (which was returned from the <schedule> method). If <act> is - // non-NULL then it will be set to point to the ``magic cookie'' - // argument passed in when the <Handler> was registered. This makes - // it possible to free up the memory and avoid memory leaks. - // Returns 1 if cancellation succeeded and 0 if the <timer_id> - // wasn't found. - virtual int handle_events (ACE_Time_Value &wait_time) = 0; // Dispatch a single set of events. If <wait_time> elapses before // any events occur, return 0. Return 1 on success i.e., when a @@ -215,6 +171,14 @@ public: ACE_HANDLE event, int priority = 0) = 0; // Create the correct implementation class for ACE_Asynch_Transmit_File::Result. + + virtual ACE_Asynch_Result_Impl *create_asynch_timer (ACE_Handler &handler, + const void *act, + const ACE_Time_Value &tv, + ACE_HANDLE event, + int priority = 0) = 0; + // Create the correct implementation object for the Timer result. }; + #endif /* (ACE_WIN32 && ACE_HAS_WINCE) || ACE_HAS_AIO_CALLS */ #endif /* ACE_PROACTOR_IMPL_H */ |