19 #include <boost/noncopyable.hpp> 24 #include <unordered_set> 44 std::size_t
key_{keyCounter_++};
79 return static_cast<T*
>(
getVoid(evb));
83 std::shared_ptr<T> smartPtr(ptr);
87 template <
typename...
Args>
89 auto smartPtr = std::make_shared<T>(std::forward<Args>(args)...);
93 template <
typename...
Args>
96 return *
static_cast<T*
>(
ptr);
98 auto smartPtr = std::make_shared<T>(std::forward<Args>(args)...);
99 auto& ref = *smartPtr;
104 template <
typename Func>
110 return *
static_cast<T*
>(
ptr);
112 std::shared_ptr<T> smartPtr(fn());
113 auto& ref = *smartPtr;
void emplace(EventBase &evb, Args &&...args)
static std::atomic< std::size_t > keyCounter_
folly::Synchronized< std::unordered_set< EventBase * > > eventBases_
void emplace(EventBase &evb, T *ptr)
constexpr detail::Map< Move > move
void * getVoid(EventBase &evb)
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
—— Concurrent Priority Queue Implementation ——
void erase(EventBase &evb)
~EventBaseLocalBase() override
void setVoid(EventBase &evb, std::shared_ptr< void > &&ptr)
T & getOrCreateFn(EventBase &evb, Func fn)
void onEventBaseDestruction(EventBase &evb) override
T & getOrCreate(EventBase &evb, Args &&...args)