folly
folly copied to clipboard
Change HazptrHoler try_protect memory fence from light to heavy
The protected pointer placed in hprec_ (store) should not be reordered after to read hazptr_obj (load). folly::asymmetric_thread_fence_light on Linux only prevents compiler reordering, but cannot prevent CPU reordering (x86 allows store-load reorder).
Therefore the load operation may be executed first but the protected pointer has not yet placed to hprec_, if there some other threads try to retire this hazptr, it might be success.