|
cds
1.3.0
|
Thread's Garbage collector. More...
#include <cds/gc/hrc/hrc.h>
Public Member Functions | |
| bool | isInitialized () const |
| Checks if thread GC is initialized. | |
| void | init () |
| Initialization. Multiple calls is allowed. | |
| void | fini () |
| Finalization. Multiple calls is allowed. | |
| details::HPGuard & | allocGuard () |
Initializes HP guard guard. | |
| void | freeGuard (details::HPGuard &guard) |
Frees HP guard guard. | |
| template<size_t Count> | |
| void | allocGuard (details::HPArray< Count > &arr) |
Initializes HP guard array arr. | |
| template<size_t Count> | |
| void | freeGuard (details::HPArray< Count > &arr) |
Frees HP guard array arr. | |
| void | retireNode (ContainerNode *pNode, details::HPGuard &hp, details::free_retired_ptr_func pFunc) |
Retire (deferred delete) node pNode guarded by hp hazard pointer. | |
| void | retireNode (ContainerNode *pNode, details::free_retired_ptr_func pFunc) |
Retire (deferred delete) node pNode. Do not use this function directly! | |
Protected Member Functions | |
| void | cleanUpLocal () |
| The procedure will try to remove redundant claimed references from link in deleted nodes that has been deleted by this thread. | |
Private Attributes | |
| GarbageCollector & | m_gc |
| master garbage collector | |
| details::thread_descriptor * | m_pDesc |
| descriptor of GC data for the thread | |
Friends | |
| class | GarbageCollector |
Thread's Garbage collector.
To use HRC reclamation schema each thread object must be linked with the object of ThreadGC class that interacts with GarbageCollector global object. The linkage is performed by calling cds::threading Manager::attachThread() on the start of each thread that uses HRC GC. Before terminating the thread linked to HRC GC it is necessary to call cds::threading Manager::detachThread().