diff options
Diffstat (limited to 'ace/Token.h')
-rw-r--r-- | ace/Token.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ace/Token.h b/ace/Token.h index c4fc805061b..54835a1ef1f 100644 --- a/ace/Token.h +++ b/ace/Token.h @@ -169,6 +169,19 @@ public: /// Return the id of the current thread that owns the token. ACE_thread_t current_owner (void); + /** + * Force all threads waiting to acquire the token to return one by + * one. The method sets the <signal_all_thread_> to non-zero if + * there're threads waiting, and returns the number of threads + * waiting. If there's no thread waiting for the token, the call + * returns 0 and doesn't do anything. The last thread releases the + * token also reset the <singal_all_thread_> flag to 0. This means, + * any threads that try to acquire the token after the call is + * issued will also get "signaled" and the number of threads waiting + * the token is only a snapshot. + */ + int signal_all_threads (void); + /// Dump the state of an object. void dump (void) const; @@ -269,6 +282,9 @@ private: /// Current nesting level. int nesting_level_; + /// Whether we are "signaling" all threads or not. + int signal_all_threads_; + /// The attributes for the condition variables, optimizes lock time. ACE_Condition_Attributes attributes_; }; |