A core-cached shared_ptr
Summary:
This class serves a similar use case to `ReadMostlySharedPtr`, but with two differences:
- It returns actual `shared_ptr`s, so it can be used as a drop-in replacement.
- Its memory utilization is constant, independent of the number of threads that use it.
Also, the code is much simpler. On the other hand, it is about 4x slower (but it still scales linearly in the number of concurrent threads acquiring the reference).
Reviewed By: djwatson
Differential Revision:
D5104730
fbshipit-source-id:
8c18b635e0390394b06417b6df8b790e4bd2d90d