~smspillaz/folly/folly-git-master

Viewing all changes in revision 5695.

  • Committer: Facebook Github Bot
  • Author(s): Maged Michael
  • Date: 2018-07-18 17:51:27 UTC
  • Revision ID: git-v1:bc809fb478378c4e6233a80cb75a36d14238447c
hazptr: Add function to reclaim linked objects without checking hazard pointers.

Summary:
Add unlink_and_reclaim member function to hazptr_obj_base_linked, as an alternative to unlink() that reclaims the object if its link count is zero without checking hazard pointers.
It is useful in destructors of data structures when it is guaranteed that objects are not protected by hazard pointers (e,.g., destructor of ConcurrentHashMap).

Reviewed By: yfeldblum

Differential Revision: D8864019

fbshipit-source-id: 618eeded45a1f8b9503569d1ceca9994ca6e317f

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: