proxygen
|
Namespaces | |
detail | |
Classes | |
class | CallbackHandle |
struct | ObservableTraits |
class | Observer |
class | ObserverCreator |
struct | ObserverTraits |
struct | ObserverTraits< T, false > |
struct | ObserverTraits< T, true > |
class | SimpleObservable |
class | Snapshot |
class | TLObserver |
Typedefs | |
template<typename T , bool CacheInThreadLocal> | |
using | ObserverT = typename ObserverTraits< T, CacheInThreadLocal >::type |
Functions | |
template<typename F > | |
Observer< observer_detail::ResultOfUnwrapSharedPtr< F > > | makeObserver (F &&creator) |
template<typename F > | |
Observer< observer_detail::ResultOf< F > > | makeObserver (F &&creator) |
template<typename T > | |
TLObserver< T > | makeTLObserver (Observer< T > observer) |
template<typename F > | |
auto | makeTLObserver (F &&creator) |
using folly::observer::ObserverT = typedef typename ObserverTraits<T, CacheInThreadLocal>::type |
Definition at line 234 of file Observer.h.
Observer< observer_detail::ResultOfUnwrapSharedPtr< F > > folly::observer::makeObserver | ( | F && | creator | ) |
Definition at line 37 of file Observer-inl.h.
References folly::observer_detail::Core::create(), and folly::observer_detail::ObserverManager::initCore().
Referenced by folly::observer::CallbackHandle::CallbackHandle(), folly::observer::ObserverCreator< Observable, Traits >::getObserver(), makeObserver(), makeObserverRecursion(), makeTLObserver(), and TEST().
Observer< observer_detail::ResultOf< F > > folly::observer::makeObserver | ( | F && | creator | ) |
makeObserver(...) creates a new Observer<T> object given a functor to compute it. The functor can return T or std::shared_ptr<const T>.
makeObserver(...) blocks until the initial version of Observer is computed. If creator functor fails (throws or returns a nullptr) during this first call, the exception is re-thrown by makeObserver(...).
For all subsequent updates if creator functor fails (throws or returs a nullptr), the Observer (and all its dependents) is not updated.
Definition at line 50 of file Observer-inl.h.
References makeObserver().
TLObserver<T> folly::observer::makeTLObserver | ( | Observer< T > | observer | ) |
Same as makeObserver(...), but creates TLObserver.
Definition at line 211 of file Observer.h.
References folly::gen::move.
Referenced by makeTLObserver(), and TEST().
auto folly::observer::makeTLObserver | ( | F && | creator | ) |