qpid::sys::DeletionManager< H > Class Template Reference
DeletionManager keeps track of handles that need to be deleted but may still be in use by one of the threads concurrently.
More...
#include <DeletionManager.h>
List of all members.
|
Static Public Member Functions |
static void | markForDeletion (H *handle) |
static void | markAllUnusedInThisThread () |
Detailed Description
template<typename H>
class qpid::sys::DeletionManager< H >
DeletionManager keeps track of handles that need to be deleted but may still be in use by one of the threads concurrently.
The mode of operation is like this:
- When we want to delete but we might still be using the handle we * Transfer ownership of the handle to this class * Mark the handle as (potentially) in use by every thread
- Then subsequently at points where the thread code knows it isn't using any handles it declares that it is using no handles
- When the last thread declares no use of a handle it automatically gets deleted by the shared_ptr implementation
The class only has static members and data and so can only be used once for any particular handle type
The documentation for this class was generated from the following file: