summaryrefslogtreecommitdiff
path: root/ace/Proactor.cpp
diff options
context:
space:
mode:
authoralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-12 21:26:23 +0000
committeralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-12 21:26:23 +0000
commit3cbd98dd2c3d67aa7a3be27160efd70a605db912 (patch)
tree64faa4a37de977099473389f270cbe71432803bd /ace/Proactor.cpp
parent82d0e1c4edd7590a357fbf13b1adfb529c01b503 (diff)
downloadATCD-3cbd98dd2c3d67aa7a3be27160efd70a605db912.tar.gz
Fixed the problem with terminating the Timer thread. Also, fixed the
places where conversion between void * and ACE_POSIX_Asynch_Result. Used ACE_reinterpret_cast at these places.
Diffstat (limited to 'ace/Proactor.cpp')
-rw-r--r--ace/Proactor.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/ace/Proactor.cpp b/ace/Proactor.cpp
index 2d261e550bd..7d7a2c1ad3c 100644
--- a/ace/Proactor.cpp
+++ b/ace/Proactor.cpp
@@ -56,9 +56,14 @@ public:
ACE_Proactor_Timer_Handler (ACE_Proactor &proactor);
// Constructor.
- ~ACE_Proactor_Timer_Handler (void);
+ virtual ~ACE_Proactor_Timer_Handler (void);
// Destructor.
+ int destroy (void);
+ // Proactor calls this to shut down the timer handler
+ // gracefully. Just calling the destructor alone doesnt do what
+ // <destroy> does. <destroy> make sure the thread exits properly.
+
protected:
virtual int svc (void);
// Run by a daemon thread to handle deferred processing. In other
@@ -89,6 +94,9 @@ ACE_Proactor_Timer_Handler::~ACE_Proactor_Timer_Handler (void)
// Signal timer event.
this->timer_event_.signal ();
+
+ // Wait for the Timer Handler thread to exit.
+ this->thr_mgr ()->wait ();
}
int
@@ -402,15 +410,15 @@ ACE_Proactor::close (void)
delete this->implementation ();
this->implementation_ = 0;
}
-
- // Take care of the timer handler
+
+ // Delete the timer handler.
if (this->timer_handler_)
{
delete this->timer_handler_;
this->timer_handler_ = 0;
}
- // Take care of the timer queue
+ // Delete the timer queue.
if (this->delete_timer_queue_)
{
delete this->timer_queue_;