Update hazard pointers prototype
Summary:
Interface:
- Got rid of std::function reclamation functions and added a Deleter template parameter.
- Got rid of the flush() member functions of hazptr_domain
- Added a lock-free non-bool member function to get a protected pointer.
Implementation:
- Implemented the interface changes.
- Changed the order of accesses in reading the shared list of objects vs reading the hazard pointers. I think the previous order would have allowed recently protected objects to be reclaimed incorrectly.
Updated the examples and tests accordingly.
Reviewed By: davidtgoldblatt
Differential Revision:
D3981284
fbshipit-source-id:
35ff60da3aea1f67c58d82437dda58f6d8b07bf5