TAO_ESF
2.4.2
|
Reference count based guard. More...
#include <ESF_RefCount_Guard.h>
Public Member Functions | |
TAO_ESF_RefCount_Guard (T &refcount) | |
Constructor. More... | |
~TAO_ESF_RefCount_Guard (void) | |
Destructor. More... | |
Protected Attributes | |
T & | refcount_ |
The reference count. More... | |
Reference count based guard.
A common idiom used on event services is to increment a reference count before starting a long running operation. The system can then execute the operation without any risk of having the underlying object destroyed. The advantage of using a reference count is that no mutex or lock needs to be held while the operation is being executed.
TAO_ESF_RefCount_Guard< T >::TAO_ESF_RefCount_Guard | ( | T & | refcount | ) |
Constructor.
TAO_ESF_RefCount_Guard< T >::~TAO_ESF_RefCount_Guard | ( | void | ) |
Destructor.
|
protected |
The reference count.