proxygen
folly::hazptr_obj_base< T, Atom, D > Class Template Reference

#include <Hazptr-fwd.h>

Inheritance diagram for folly::hazptr_obj_base< T, Atom, D >:
folly::hazptr_obj< Atom > folly::hazptr_deleter< T, D >

Public Member Functions

void retire (D deleter={}, hazptr_domain< Atom > &domain=default_hazptr_domain< Atom >())
 
void retire (hazptr_domain< Atom > &domain)
 
- Public Member Functions inherited from folly::hazptr_obj< Atom >
 hazptr_obj () noexcept
 
 hazptr_obj (const hazptr_obj< Atom > &) noexcept
 
 hazptr_obj (hazptr_obj< Atom > &&) noexcept
 
hazptr_obj< Atom > & operator= (const hazptr_obj< Atom > &) noexcept
 
hazptr_obj< Atom > & operator= (hazptr_obj< Atom > &&) noexcept
 
- Public Member Functions inherited from folly::hazptr_deleter< T, D >
void set_deleter (D d={})
 
void delete_obj (T *p)
 

Private Member Functions

void pre_retire (D deleter)
 
void set_reclaim ()
 

Detailed Description

template<typename T, template< typename > class Atom, typename D>
class folly::hazptr_obj_base< T, Atom, D >

hazptr_obj_base

hazptr_obj_base

Base template for objects protected by hazard pointers.

Definition at line 66 of file Hazptr-fwd.h.

Member Function Documentation

template<typename T, template< typename > class Atom, typename D>
void folly::hazptr_obj_base< T, Atom, D >::pre_retire ( D  deleter)
inlineprivate

Definition at line 242 of file HazptrObj.h.

242  {
243  this->pre_retire_check(); // defined in hazptr_obj
244  this->set_deleter(std::move(deleter));
245  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
void pre_retire_check() noexcept
Definition: HazptrObj.h:102
void set_deleter(D d={})
Definition: HazptrObj.h:200
template<typename T, template< typename > class Atom, typename D>
void folly::hazptr_obj_base< T, Atom, D >::retire ( D  deleter = {},
hazptr_domain< Atom > &  domain = default_hazptr_domain<Atom>() 
)
inline
template<typename T, template< typename > class Atom, typename D>
void folly::hazptr_obj_base< T, Atom, D >::retire ( hazptr_domain< Atom > &  domain)
inline

Definition at line 237 of file HazptrObj.h.

237  {
238  retire({}, domain);
239  }
void retire(D deleter={}, hazptr_domain< Atom > &domain=default_hazptr_domain< Atom >())
Definition: HazptrObj.h:229
template<typename T, template< typename > class Atom, typename D>
void folly::hazptr_obj_base< T, Atom, D >::set_reclaim ( )
inlineprivate

Definition at line 247 of file HazptrObj.h.

247  {
248  this->reclaim_ = [](hazptr_obj<Atom>* p, hazptr_obj_list<Atom>&) {
249  auto hobp = static_cast<hazptr_obj_base<T, Atom, D>*>(p);
250  auto obj = static_cast<T*>(hobp);
251  hobp->delete_obj(obj);
252  };
253  }
ReclaimFnPtr reclaim_
Definition: HazptrObj.h:54
folly::std T

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