76 CHECK(
evb_->runInEventBaseThread(
78 f = std::forward<F>(
f)]()
mutable {
f(); }));
88 evb_->attachTimeoutManager(obj,
internal);
92 evb_->detachTimeoutManager(obj);
97 return evb_->scheduleTimeout(obj, timeout);
101 evb_->cancelTimeout(obj);
105 evb_->bumpHandlingTime();
109 return evb_->isInTimeoutManagerThread();
120 return evb_->inRunningEventBaseThread();
125 if (
evb_->inRunningEventBaseThread()) {
136 if (!
evb_->inRunningEventBaseThread()) {
170 makeKeepAlive<VirtualEventBase>(
this)};
void attachTimeoutManager(AsyncTimeout *obj, TimeoutManager::InternalEnum internal) override
std::chrono::milliseconds timeout_type
void runInEventBaseThread(F &&f)
std::promise< void > destroyPromise_
~VirtualEventBase() override
EventBase & getEventBase()
bool inRunningEventBaseThread() const
constexpr detail::Map< Move > move
void runOnDestruction(EventBase::LoopCallback *callback)
void keepAliveRelease() override
folly::Synchronized< LoopCallbackList > onDestructionCallbacks_
—— Concurrent Priority Queue Implementation ——
bool isInTimeoutManagerThread() override
KeepAlive< EventBase > evb_
void detachTimeoutManager(AsyncTimeout *obj) override
ssize_t loopKeepAliveCount_
EventBase::LoopCallback::List LoopCallbackList
bool keepAliveAcquire() override
void cancelTimeout(AsyncTimeout *obj) override
std::atomic< ssize_t > loopKeepAliveCountAtomic_
VirtualEventBase & operator=(const VirtualEventBase &)=delete
static KeepAlive< ExecutorT > getKeepAliveToken(ExecutorT *executor)
void add(folly::Func f) override
bool scheduleTimeout(AsyncTimeout *obj, TimeoutManager::timeout_type timeout) override
boost::intrusive::list< LoopCallback, boost::intrusive::constant_time_size< false > > List
VirtualEventBase(EventBase &evb)
void bumpHandlingTime() override
KeepAlive< VirtualEventBase > loopKeepAlive_
std::future< void > destroy()
std::future< void > destroyFuture_