23 #include <glog/logging.h> 28 : timeoutManager_(timeoutManager) {
117 LOG(
FATAL) <<
"detachEventBase() called on scheduled timeout; aborting";
133 assert(events == EV_TIMEOUT);
std::chrono::milliseconds timeout_type
virtual bool scheduleTimeout(AsyncTimeout *obj, timeout_type timeout)=0
std::shared_ptr< RequestContext > context_
—— Concurrent Priority Queue Implementation ——
auto event_ref_flags(struct event *ev) -> decltype(std::ref(ev->ev_flags))
void folly_event_set(event *e, int fd, short s, EventSetCallback f, void *arg)
virtual void attachTimeoutManager(AsyncTimeout *obj, InternalEnum internal)=0
static std::shared_ptr< RequestContext > saveContext()
static void libeventCallback(libevent_fd_t fd, short events, void *arg)
void attachTimeoutManager(TimeoutManager *timeoutManager, InternalEnum internal=InternalEnum::NORMAL)
static bool isEventRegistered(const struct event *ev)
void attachEventBase(EventBase *eventBase, InternalEnum internal=InternalEnum::NORMAL)
virtual void timeoutExpired() noexcept=0
virtual bool isInTimeoutManagerThread()=0
virtual void detachTimeoutManager(AsyncTimeout *obj)=0
bool scheduleTimeout(uint32_t milliseconds)
void detachTimeoutManager()
int libeventFdToFd(libevent_fd_t fd)
TimeoutManager * timeoutManager_
virtual void bumpHandlingTime()=0
virtual void cancelTimeout(AsyncTimeout *obj)=0