CUBRID Engine  latest
resource_shared_pool< T > Class Template Reference

#include <resource_shared_pool.hpp>

Inheritance diagram for resource_shared_pool< T >:
Inheritance graph
Collaboration diagram for resource_shared_pool< T >:
Collaboration graph

Public Member Functions

 resource_shared_pool (size_t size, bool allow_claimed_on_destruction=false)
 
 resource_shared_pool (T *resources, size_t size, bool allow_claimed_on_destruction=false)
 
 ~resource_shared_pool ()
 
T * claim (void)
 
void retire (T &claimed)
 

Private Member Functions

 resource_shared_pool ()
 
 resource_shared_pool (const resource_shared_pool &)
 
void populate_free_stack ()
 

Private Attributes

size_t m_size
 
size_t m_free_stack_size
 
std::mutex m_mutex
 
T * m_resources
 
T * m_own_resources
 
T ** m_free_stack
 
bool m_allow_claimed_on_destruction
 

Detailed Description

template<class T>
class resource_shared_pool< T >

Definition at line 29 of file resource_shared_pool.hpp.

Constructor & Destructor Documentation

template<class T>
resource_shared_pool< T >::resource_shared_pool ( size_t  size,
bool  allow_claimed_on_destruction = false 
)
inline

Definition at line 32 of file resource_shared_pool.hpp.

template<class T>
resource_shared_pool< T >::resource_shared_pool ( T *  resources,
size_t  size,
bool  allow_claimed_on_destruction = false 
)
inline

Definition at line 43 of file resource_shared_pool.hpp.

template<class T>
resource_shared_pool< T >::~resource_shared_pool ( )
inline

Definition at line 55 of file resource_shared_pool.hpp.

template<class T>
resource_shared_pool< T >::resource_shared_pool ( )
private

Referenced by resource_shared_pool< cubload::driver >::retire().

Here is the caller graph for this function:

template<class T>
resource_shared_pool< T >::resource_shared_pool ( const resource_shared_pool< T > &  )
private

Member Function Documentation

template<class T>
T* resource_shared_pool< T >::claim ( void  )
inline

Definition at line 62 of file resource_shared_pool.hpp.

Referenced by cubthread::manager::claim_entry().

Here is the caller graph for this function:

template<class T>
void resource_shared_pool< T >::populate_free_stack ( )
inlineprivate

Definition at line 88 of file resource_shared_pool.hpp.

Referenced by resource_shared_pool< cubload::driver >::resource_shared_pool().

Here is the caller graph for this function:

template<class T>
void resource_shared_pool< T >::retire ( T &  claimed)
inline

Definition at line 74 of file resource_shared_pool.hpp.

Referenced by cubthread::manager::retire_entry().

Here is the caller graph for this function:

Member Data Documentation

template<class T>
bool resource_shared_pool< T >::m_allow_claimed_on_destruction
private

The documentation for this class was generated from the following file: