|
cds
1.4.0
|
Wrapper for ptb::ThreadGC class. More...
#include <cds/gc/ptb.h>
Public Member Functions | |
| thread_gc (bool bPersistent=false) | |
| Constructor. More... | |
| ~thread_gc () | |
| Destructor. More... | |
Public Member Functions inherited from cds::gc::ptb::ThreadGC | |
| ~ThreadGC () | |
| Dtor calls fini() | |
| void | init () |
| Initialization. Repeat call is available. | |
| void | fini () |
| Finalization. Repeat call is available. | |
| void | allocGuard (Guard &g) |
Initializes guard g. | |
| void | freeGuard (Guard &g) |
Frees guard g. | |
| template<size_t Count> | |
| void | allocGuard (GuardArray< Count > &arr) |
Initializes guard array arr. | |
| template<size_t Count> | |
| void | freeGuard (GuardArray< Count > &arr) |
Frees guard array arr. | |
| template<typename T > | |
| void | retirePtr (T *p, void(*pFunc)(T *)) |
Places retired pointer and its deleter pFunc into list of retired pointer for deferred reclamation. | |
Wrapper for ptb::ThreadGC class.
This class performs automatically attaching/detaching Pass-the-Buck GC for the current thread.
| cds::gc::PTB::thread_gc::thread_gc | ( | bool | bPersistent = false | ) |
Constructor.
The constructor attaches the current thread to the Pass-the-Buck GC if it is not yet attached. The bPersistent parameter specifies attachment persistence:
true - the class destructor will not detach the thread from Pass-the-Buck GC.false (default) - the class destructor will detach the thread from Pass-the-Buck GC. | cds::gc::PTB::thread_gc::~thread_gc | ( | ) |
Destructor.
If the object has been created in persistent mode, the destructor does nothing. Otherwise it detaches the current thread from Pass-the-Buck GC.