}
VLOG(5) << "EventBase(): Created.";
initNotificationQueue();
- RequestContext::saveContext();
}
// takes ownership of the event_base
throw std::invalid_argument("EventBase(): event base cannot be nullptr");
}
initNotificationQueue();
- RequestContext::saveContext();
}
EventBase::~EventBase() {
while (!currentCallbacks.empty()) {
LoopCallback* callback = ¤tCallbacks.front();
currentCallbacks.pop_front();
- folly::RequestContextScopeGuard rctx(callback->context_);
+ folly::RequestContextScopeGuard rctx(std::move(callback->context_));
callback->runLoopCallback();
}