proxygen
|
#include <Hazptr-fwd.h>
Public Member Functions | |
void | retire () |
void | unlink () |
void | unlink_and_reclaim_unchecked () |
Public Member Functions inherited from folly::hazptr_obj_linked< Atom > | |
void | acquire_link () noexcept |
void | acquire_link_safe () noexcept |
void | acquire_ref () noexcept |
void | acquire_ref_safe () noexcept |
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 Types | |
using | Stack = std::stack< hazptr_obj_base_linked< T, Atom, D > * > |
Private Member Functions | |
void | set_reclaim () noexcept |
void | downgrade_retire_immutable_descendants () |
void | release_delete_immutable_descendants () |
void | release_retire_mutable_children (hazptr_obj_list< Atom > &l) |
void | call_push_links (bool m, Stack &s) |
void | delete_self () |
Base class template for link counted objects.
Supports both explicit and implicit object retirement, depending on whether object removal is certain or uncertain.
A derived object's removal is certain when it is always possible to reason based only on the local state of user code when an object is removed, i.e., becomes unreachable from static roots. Otherwise, removal is uncertain.
For example, Removal in UnboundedQueue is certain, whereas removal is ConcurrentHashMap is uncertain.
If removal is certain, user code can call retire() explicitly. Otherwise, user code should call unlink() whenever an inbound link to the object is changed. Calls to unlink() automatically retire the object when the link count is decremented to 0. [Note: A ref count greater than 0 does not delay retiring an object.]
Derived type T must define a member function template template <typename s>=""> void push_links(bool m, S& s) { if (m) { // m stands mutable links // for each outbound mutable pointer p call // s.push(p); } else { // for each outbound immutable pointer p call // s.push(p); } }
T may have both, either, or none of the two types of outbound links. For example, UnboundedQueue Segment has an immutable link, and ConcurrentHashMap NodeT has a mutable link.
Definition at line 86 of file Hazptr-fwd.h.
|
private |
Definition at line 236 of file HazptrObjLinked.h.
|
inlineprivate |
Definition at line 317 of file HazptrObjLinked.h.
|
inlineprivate |
Definition at line 321 of file HazptrObjLinked.h.
|
inlineprivate |
Definition at line 277 of file HazptrObjLinked.h.
|
inlineprivate |
Definition at line 290 of file HazptrObjLinked.h.
Referenced by folly::hazptr_obj_base_linked< NodeAuto< Atom >, Atom >::set_reclaim().
|
inlineprivate |
Definition at line 303 of file HazptrObjLinked.h.
|
inline |
Definition at line 239 of file HazptrObjLinked.h.
Referenced by basic_objects_test().
|
inlineprivatenoexcept |
Definition at line 266 of file HazptrObjLinked.h.
|
inline |
Definition at line 247 of file HazptrObjLinked.h.
|
inline |
Definition at line 258 of file HazptrObjLinked.h.