|
proxygen
|
#include <TLRefCount.h>
Classes | |
| class | LocalRefCount |
Public Types | |
| using | Int = int64_t |
Public Member Functions | |
| TLRefCount () | |
| ~TLRefCount () noexcept | |
| Int | operator++ () noexcept |
| Int | operator-- () noexcept |
| Int | operator* () const |
| void | useGlobal () noexcept |
Static Public Member Functions | |
| template<typename Container > | |
| static void | useGlobal (const Container &refCountPtrs) |
Private Types | |
| enum | State { State::LOCAL, State::GLOBAL_TRANSITION, State::GLOBAL } |
| using | AtomicInt = std::atomic< Int > |
Private Attributes | |
| std::atomic< State > | state_ {State::LOCAL} |
| folly::ThreadLocal< LocalRefCount, TLRefCount > | localCount_ |
| std::atomic< int64_t > | globalCount_ {1} |
| std::mutex | globalMutex_ |
| std::shared_ptr< void > | collectGuard_ |
Definition at line 23 of file TLRefCount.h.
|
private |
Definition at line 128 of file TLRefCount.h.
| using folly::TLRefCount::Int = int64_t |
Definition at line 25 of file TLRefCount.h.
|
strongprivate |
| Enumerator | |
|---|---|
| LOCAL | |
| GLOBAL_TRANSITION | |
| GLOBAL | |
Definition at line 130 of file TLRefCount.h.
|
inline |
Definition at line 27 of file TLRefCount.h.
References collectGuard_.
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
Definition at line 37 of file TLRefCount.h.
References GLOBAL, GLOBAL_TRANSITION, globalCount_, globalMutex_, localCount_, state_, and folly::value().
|
inlinenoexcept |
Definition at line 60 of file TLRefCount.h.
References GLOBAL, GLOBAL_TRANSITION, globalCount_, globalMutex_, localCount_, and state_.
|
inlinenoexcept |
|
inlinestatic |
Definition at line 89 of file TLRefCount.h.
References folly::asymmetricHeavyBarrier(), count, GLOBAL, and GLOBAL_TRANSITION.
|
private |
Definition at line 209 of file TLRefCount.h.
Referenced by folly::TLRefCount::LocalRefCount::collect(), folly::TLRefCount::LocalRefCount::LocalRefCount(), TLRefCount(), and folly::TLRefCount::LocalRefCount::update().
|
private |
Definition at line 207 of file TLRefCount.h.
Referenced by operator*(), operator++(), operator--(), and ~TLRefCount().
|
private |
Definition at line 208 of file TLRefCount.h.
Referenced by folly::TLRefCount::LocalRefCount::LocalRefCount(), operator++(), and operator--().
|
private |
Definition at line 206 of file TLRefCount.h.
Referenced by operator++(), and operator--().
|
private |
Definition at line 205 of file TLRefCount.h.
Referenced by operator*(), operator++(), operator--(), and ~TLRefCount().