Add stress test for atomic_shared_ptr
commitb92e85a092191cdc94757bd6b304d7fec17e3a6c
authorGiuseppe Ottaviano <ott@meta.com>
Sat, 1 Oct 2022 12:22:20 +0000 (1 05:22 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sat, 1 Oct 2022 12:22:20 +0000 (1 05:22 -0700)
tree3abfe6514b8f4099d681c53a21ab26fdb23eab24
parent94e5ecdcef66f654a8217988243adf307b305972
Add stress test for atomic_shared_ptr

Summary: None of the existing unit tests exercises the local -> global refcount transfer, which is the most critical part in `atomic_shared_ptr` in terms of correctness, so add a stress test that `load()`s the pointer enough times to trigger a transfer.

Reviewed By: dmm-fb

Differential Revision: D39927439

fbshipit-source-id: a8a50e33dd4afd1bd7bf0a2c309d92503bfb949c
third-party/folly/src/folly/concurrency/test/AtomicSharedPtrTest.cpp