UpdateableSharedPtr in folly
authorDave Watson <davejwatson@fb.com>
Wed, 30 Sep 2015 14:42:24 +0000 (07:42 -0700)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Wed, 30 Sep 2015 15:20:16 +0000 (08:20 -0700)
commit1673619a96338ad2bbf953e85c2d539867735352
tree8d5a26385b5d96dbd55cd8b358f33c9f3ce98208
parent6daec3163fdb0ed6103b829718b5b042cccbeace
UpdateableSharedPtr in folly

Summary: This diff adds UpdateableSharedPtr and FastUpdateableSharedPtr classes to folly. They are efficiet RCU-style holders for a shared_ptr. See the comment at the top of UpdateableSharedPtr.h for a more detailed description and benchmark results.

All the added files are copied from logdevice code with (almost) no changes (`logdevice/common/` on branch `origin/logdevice-latest`). We've been using them in logdevice for a few months. D1821723 introduced it.

Reviewed By: @​bmaurer

Differential Revision: D1919702
folly/Makefile.am
folly/ReadMostlySharedPtr.h [new file with mode: 0644]
folly/test/ReadMostlySharedPtrBenchmark.cpp [new file with mode: 0644]
folly/test/ReadMostlySharedPtrTest.cpp [new file with mode: 0644]