proxygen
|
#include <folly/synchronization/Hazptr-fwd.h>
#include <folly/synchronization/HazptrDomain.h>
#include <folly/synchronization/HazptrHolder.h>
#include <folly/synchronization/HazptrObj.h>
#include <folly/synchronization/HazptrObjLinked.h>
#include <folly/synchronization/HazptrRec.h>
#include <folly/synchronization/HazptrThrLocal.h>
Go to the source code of this file.
Functions | |
*U | get_config (V v) |
***void | update_config (Config *new_config) |
**Optimized Holders **The template hazptr_array< M > provides most of the functionality *of M hazptr_holder s but with faster construction destruction *for at the cost of | restrictions (on move and swap).*-The template hazptr_local< M > provides greater speed even when *M |
**Optimized Holders **The template hazptr_array< M > provides most of the functionality *of M hazptr_holder s but with faster construction destruction *for at the cost of if then it *can be | faster (by~3 ns.) to use *hazptr_local< 1 > h |
Variables | |
***std::atomic< Config * > | config_ |
**Optimized Holders **The template hazptr_array< M > provides most of the functionality *of M hazptr_holder s but with faster construction destruction *for | M |
*Config * | ptr = h[0].get_protected(config_) |
*than *hazptr_holder | h |
* * Optimized Holders* * The template hazptr_array<M> provides most of the functionality* of M hazptr_holder s but with faster construction destruction* for at the cost of if then it* can be faster | ( | by~3 | ns. | ) |
***U get_config | ( | V | v | ) |
Hazard pointers is a safe reclamation method. It protects objects from being reclaimed while being accessed by one or more threads, but allows objects to be removed concurrently while being accessed.
A hazard pointer is a single-writer multi-reader pointer that can be owned by at most one thread at a time. To protect an object A from being reclaimed while in use, a thread X sets one of its owned hazard pointers, P, to the address of A. If P is set to &A before A is removed (i.e., it becomes unreachable) then A will not be reclaimed as long as P continues to hold the value &A.
class Config : public hazptr_obj_base<Config> { /* ... details ...
* * Optimized Holders* * The template hazptr_array<M> provides most of the functionality* of M hazptr_holder s but with faster construction destruction* for at the cost of restrictions | ( | on move and | swap | ) |
* * * std::atomic<Config*> config_ |
Definition at line 80 of file Hazptr.h.
Referenced by HTTPSessionAcceptorTestBase::SetUp(), HTTPSessionAcceptorTestBase::setupSSL(), TEST_F(), and TEST_P().
* than* hazptr_holder h |
Definition at line 116 of file Hazptr.h.
Referenced by folly::hazptr_domain< DeterministicAtomic >::acquire_new_hprec(), proxygen::QueueTest::addTransaction(), array_test(), folly::test::atomic_notify_one(), auto_retire_test(), folly::coro::detail::InlineTaskPromiseBase::FinalAwaiter::await_suspend(), basic_holders_test(), basic_protection_test(), wangle::ServerBootstrap< DefaultPipeline >::childHandler(), cleanup_test(), folly::cUnescape(), proxygen::HTTPMessage::describe(), folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::erase_internal(), folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::find(), folly::IOThreadPoolExecutor::getEventBase(), folly::detail::MemoryIdler::getVariationTimeout(), folly::io::test::DataHolder::hash(), folly::dynamic::hash(), folly::hash::hash_combine_generic(), folly::io::test::hashIOBuf(), folly::hazptr_array< 3, Atom >::hazptr_array(), folly::hazptr_local< M, Atom >::hazptr_local(), holder_bench(), folly::symbolizer::ElfFile::init(), folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::insert_internal(), folly::AtomicUnorderedInsertMap< Key, Value, Hash, KeyEqual, SkipKeyValueDeletion, Atom, IndexType, Allocator >::keyToSlotIdx(), folly::IndexedMemPool< T, NumLocalLists_, LocalListLimit_, Atom, Traits >::localPop(), folly::IndexedMemPool< T, NumLocalLists_, LocalListLimit_, Atom, Traits >::localPush(), folly::LogCategoryConfig::LogCategoryConfig(), folly::makeExpected(), folly::makePromiseContract(), testing::gmock_generated_function_mockers_test::MockFoo::MockFoo(), proxygen::HTTPServerAcceptor::newHandler(), proxygen::RejectConnectFilterFactory::onRequest(), proxygen::ZlibServerFilterFactory::onRequest(), hash< folly::Optional< T > >::operator()(), proxygen::operator<<(), folly::hazptr_array< 3, Atom >::operator=(), folly::hazptr_array< 3, Atom >::operator[](), folly::hazptr_local< M, Atom >::operator[](), folly::ConcurrentHashMap< KeyType, ValueType, HashFn, KeyEqual, Allocator, ShardBits, Atom, Mutex >::pickSegment(), folly::HazptrLockFreeLIFO< T, Atom >::pop(), proxygen::compress::prepareHeaders(), folly::UnboundedQueue< T, false, 6 >::reclaimRemainingSegments(), folly::netops::recvfrom(), folly::netops::recvmsg(), folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::rehash(), folly::hazptr_domain< DeterministicAtomic >::relaxed_cleanup(), folly::Getcpu::resolveVdsoFunc(), folly::netops::sendmsg(), proxygen::HTTP2PriorityQueue::setMaxVirtualNodes(), folly::AsyncServerSocket::setShutdownSocketSet(), folly::detail::SkipListNode< T >::setSkip(), folly::detail::LifoSemBase< BatonType, Atom >::shutdown(), FooLongSleep::start(), TEST(), TEST_F(), TestDeltas(), wangle::ServerWorkerPool::threadStarted(), folly::PicoSpinLock< uintptr_t >::try_lock(), folly::PicoSpinLock< uintptr_t >::unlock(), folly::detail::LifoSemBase< BatonType, Atom >::valueGuess(), testing::gmock_generated_function_mockers_test::FooInterface::~FooInterface(), folly::hazptr_array< 3, Atom >::~hazptr_array(), and folly::hazptr_local< M, Atom >::~hazptr_local().
* * Optimized Holders* * The template hazptr_array<M> provides most of the functionality* of M hazptr_holder s but with faster construction destruction* for M |
Definition at line 104 of file Hazptr.h.
Referenced by array_dtor_full_tc_test(), folly::BasicFixedString< Char, N >::assign(), folly::BasicFixedString< Char, N >::BasicFixedString(), testing::internal::MatcherCastImpl< T, M >::Cast(), testing::internal::MatcherCastImpl< T, Matcher< T > >::Cast(), testing::SafeMatcherCastImpl< T >::Cast(), folly::constexpr_add_overflow_clamped(), folly::constexpr_sub_overflow_clamped(), folly::get_default(), folly::hazptr_array< 3, Atom >::hazptr_array(), folly::hazptr_local< M, Atom >::hazptr_local(), IntArray< M >::IntArray(), folly::invoke(), folly::lock(), testing::internal::BoundSecondMatcher< Tuple2Matcher, Second >::Impl< T >::MatchAndExplain(), folly::LockedPtr< SynchronizedType, LockPolicy >::moveFromWriteToRead(), testing::internal::ContainsMatcher< M >::operator Matcher< Container >(), testing::internal::EachMatcher< M >::operator Matcher< Container >(), testing::internal::KeyMatcher< M >::operator Matcher< PairType >(), std::hash< TestStruct >::operator()(), testing::internal::MatcherAsPredicate< M >::operator()(), testing::internal::PredicateFormatterFromMatcher< M >::operator()(), folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, Alloc >::operator=(), folly::hazptr_array< 3, Atom >::operator=(), folly::BasicFixedString< Char, N >::operator=(), folly::hazptr_array< 3, Atom >::operator[](), folly::hazptr_local< M, Atom >::operator[](), wangle::ByteToMessageDecoder< T >::read(), folly::rlock(), folly::test::run_test(), runSingleInsert(), runVisitContiguousRangesTest(), folly::SharedPromise< folly::folly::Unit >::setValue(), folly::Promise< folly::folly::Unit >::setValue(), TEST(), TEST_F(), TestInitGoogleMock(), folly::ulock(), folly::hazptr_array< 3, Atom >::~hazptr_array(), and folly::hazptr_local< M, Atom >::~hazptr_local().