hazptr: Allow destruction of obj batch after default domain
Summary: Allow hazptr_obj_batch-es to outlive the default domain. Background: Until now it was expected that batches are destructed before the destruction of the default domain. This may be restrictive to good use cases. This diff removes the above mentioned restriction and gives hazptr_obj_batch::shutdown_and_reclaim() to decide whether or not to access the default domain by supporting a singleton bool in default_hazptr_domain_alive() that could be made to outlive the default domain by calling that function before constructing the user object that may outlive the default domain. Reviewed By: aary Differential Revision: D18297698 fbshipit-source-id: 6021479ab36ce86d2c411fd71974fde47f7502a2
Showing
Please register or sign in to comment