hazard pointers: Fix flaky test
Summary: Fix flaky test. Without this fix it is possible for the background asynchronous reclamation thread to be too slow in pushing p1 into the cohorts safe list before the main thread checks for p1's reclamation. This fix lets the main thread wait for p1 to be reclaimed before checking that p2 was not reclaimed. Since p1 is considered for reclamation before p2, it is possible that this check would pass even if p2 was about to be reclaimed in error. So the test then retires p3 and waits for it to be reclaimed before checking again that p2 was not reclaimed. Reviewed By: yfeldblum Differential Revision: D30248673 fbshipit-source-id: 268edb299681ab4b7256dac591d8cacbb960a7cc
Showing
Please register or sign in to comment