Add free-function retire
authorDave Watson <davejwatson@fb.com>
Mon, 20 Nov 2017 16:18:27 +0000 (08:18 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 20 Nov 2017 16:30:09 +0000 (08:30 -0800)
commit7046d43c7e3c18ebc28c62141b8e1eefabce5323
treeddb6cfb786598aed934757dd744f33de02f14064
parent79376dc7937cd38c10c0c632e3b39c6955ebd734
Add free-function retire

Summary:
Adds a hazptr_retire and domain::retire methods to hazptr.  They both allocate memory instead of inheriting.

This will make implementation of google's cell proposal trivial, vs. D4754972 which felt overwraught.

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0561r0.html

Reviewed By: magedm

Differential Revision: D6361162

fbshipit-source-id: 9f259f434139f960483b2ab7c5190d3807edcf52
folly/experimental/hazptr/hazptr-impl.h
folly/experimental/hazptr/hazptr.h
folly/experimental/hazptr/test/HazptrTest.cpp