diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-29 11:18:41 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-29 11:18:41 +0000 |
commit | 20abbf09e8d72796fe5ce2753e22d795651e8e24 (patch) | |
tree | 04bbefaed72bfd1f006a24cede3e6f67425552bc | |
parent | 3debd3db87284ed0dd0dfa05d75a3de43336b36a (diff) | |
download | ATCD-20abbf09e8d72796fe5ce2753e22d795651e8e24.tar.gz |
More renew bug fix
-rw-r--r-- | ace/Select_Reactor.cpp | 11 | ||||
-rw-r--r-- | ace/Select_Reactor.h | 10 | ||||
-rw-r--r-- | ace/Select_Reactor.i | 12 |
3 files changed, 28 insertions, 5 deletions
diff --git a/ace/Select_Reactor.cpp b/ace/Select_Reactor.cpp index cfa72cae497..4990e61c9d2 100644 --- a/ace/Select_Reactor.cpp +++ b/ace/Select_Reactor.cpp @@ -560,7 +560,7 @@ ACE_Select_Reactor::renew (void) { ACE_TRACE ("ACE_Select_Reactor::renew"); #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) - if (this->supress_renew () == 0) + if (this->supress_notify_renew () == 0) this->token_.renew (this->requeue_position_); #endif /* defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) */ } @@ -627,8 +627,7 @@ ACE_Select_Reactor_Token::sleep_hook (void) #endif /* ACE_MT_SAFE */ ACE_Select_Reactor_Notify::ACE_Select_Reactor_Notify (void) - : max_notify_iterations_ (-1), - supress_renew_ (0) + : max_notify_iterations_ (-1) { } @@ -1097,7 +1096,8 @@ ACE_Select_Reactor::ACE_Select_Reactor (ACE_Sig_Handler *sh, #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) token_ (*this), #endif /* ACE_MT_SAFE */ - lock_adapter_ (token_) + lock_adapter_ (token_), + supress_renew_ (0) { ACE_TRACE ("ACE_Select_Reactor::ACE_Select_Reactor"); @@ -1132,7 +1132,8 @@ ACE_Select_Reactor::ACE_Select_Reactor (size_t size, #if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0) token_ (*this), #endif /* ACE_MT_SAFE */ - lock_adapter_ (token_) + lock_adapter_ (token_), + supress_renew_ (0) { ACE_TRACE ("ACE_Select_Reactor::ACE_Select_Reactor"); diff --git a/ace/Select_Reactor.h b/ace/Select_Reactor.h index c5e5eeddb88..a43c64c60b5 100644 --- a/ace/Select_Reactor.h +++ b/ace/Select_Reactor.h @@ -944,10 +944,20 @@ protected: int handle_events_i (ACE_Time_Value *max_wait_time = 0); // Stops the VC++ compiler from bitching about exceptions and destructors + + int supress_notify_renew (void); + void supress_notify_renew (int sr); + // Controls/access whether the notify handler should renew the + // Select_Reactor's token or not. + friend class ACE_Select_Reactor_Notify; friend class ACE_Select_Reactor_Handler_Repository; private: + int supress_renew_; + // Determine whether we should renew Select_Reactor's token after handling + // the notification message. + ACE_Select_Reactor (const ACE_Select_Reactor &); ACE_Select_Reactor &operator = (const ACE_Select_Reactor &); // Deny access since member-wise won't work... diff --git a/ace/Select_Reactor.i b/ace/Select_Reactor.i index 57d5fb6b58a..055b961c003 100644 --- a/ace/Select_Reactor.i +++ b/ace/Select_Reactor.i @@ -251,6 +251,18 @@ ACE_Select_Reactor::size (void) return this->handler_rep_.size (); } +ACE_INLINE int +ACE_Select_Reactor::supress_notify_renew (void) +{ + return this->supress_renew_; +} + +ACE_INLINE void +ACE_Select_Reactor::supress_notify_renew (int sr) +{ + this->supress_renew_ = sr; +} + ACE_INLINE ACE_Event_Tuple::ACE_Event_Tuple (void) |