25 auto data = core_->getData();
40 [creator = std::forward<F>(creator)]()
mutable {
41 return std::static_pointer_cast<
const void>(creator());
51 return makeObserver([creator = std::forward<F>(creator)]()
mutable {
52 return std::make_shared<observer_detail::ResultOf<F>>(creator());
58 : observer_(observer),
87 context_ = std::make_shared<Context>();
91 auto rCanceled =
context->canceled.rlock();
108 context_->observer.reset();
109 context_->canceled =
true;
113 template <
typename T>
TLObserver(Observer< T > observer)
static bool inManagerThread()
CallbackHandle addCallback(folly::Function< void(Snapshot< T >)> callback) const
constexpr detail::Map< Move > move
—— Concurrent Priority Queue Implementation ——
Observer< observer_detail::ResultOfUnwrapSharedPtr< F > > makeObserver(F &&creator)
std::shared_ptr< Core > Ptr
static void initCore(Core::Ptr core)
constexpr auto data(C &c) -> decltype(c.data())
Snapshot< T > getSnapshot() const
const Snapshot< T > & getSnapshotRef() const
folly::ThreadLocal< Snapshot< T > > snapshot_
Observer(observer_detail::Core::Ptr core)
static Ptr create(folly::Function< std::shared_ptr< const void >()> creator)
Optional< Observer< folly::Unit > > observer