#include <TP_Reactor.h>
Collaboration diagram for ACE_TP_Token_Guard:
Public Methods | |
ACE_TP_Token_Guard (ACE_Select_Reactor_Token &token) | |
Constructor that will grab the token for us. | |
~ACE_TP_Token_Guard (void) | |
void | release_token (void) |
Release the token .. | |
int | is_owner (void) |
int | grab_token (ACE_Time_Value *max_wait_time=0) |
int | acquire_token (ACE_Time_Value *max_wait_time=0) |
Private Methods | |
ACE_TP_Token_Guard (void) | |
Private Attributes | |
ACE_Select_Reactor_Token & | token_ |
The Select Reactor token. | |
int | owner_ |
In short, this class will be owned by one thread by creating on the stack. This class gives the status of the ownership of the token and manages the ownership
|
Constructor that will grab the token for us.
|
|
Destructor. This will release the token if it hasnt been released till this point |
|
|
|
A helper method that grabs the token for us, after which the thread that owns that can do some actual work. This differs from grab_token () as it uses acquire () to get the token instead of acquire_read () |
|
A helper method that grabs the token for us, after which the thread that owns that can do some actual work.
|
|
Returns whether the thread that created this object ownes the token or not. |
|
Release the token ..
|
|
Flag that indicate whether the thread that created this object owns the token or not. A value of 0 indicates that this class hasnt got the token (and hence the thread) and a value of 1 vice-versa. |
|
The Select Reactor token.
|