projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix RequestContext held too long issue in EventBase
[folly.git]
/
folly
/
io
/
async
/
EventBase.cpp
diff --git
a/folly/io/async/EventBase.cpp
b/folly/io/async/EventBase.cpp
index b0e1eda68ae8332d4020d1282d852dcec1868ac1..c1ed73365413b866f367d2b4d5504012cb6dfb72 100644
(file)
--- a/
folly/io/async/EventBase.cpp
+++ b/
folly/io/async/EventBase.cpp
@@
-114,7
+114,6
@@
EventBase::EventBase(bool enableTimeMeasurement)
}
VLOG(5) << "EventBase(): Created.";
initNotificationQueue();
}
VLOG(5) << "EventBase(): Created.";
initNotificationQueue();
- RequestContext::saveContext();
}
// takes ownership of the event_base
}
// takes ownership of the event_base
@@
-140,7
+139,6
@@
EventBase::EventBase(event_base* evb, bool enableTimeMeasurement)
throw std::invalid_argument("EventBase(): event base cannot be nullptr");
}
initNotificationQueue();
throw std::invalid_argument("EventBase(): event base cannot be nullptr");
}
initNotificationQueue();
- RequestContext::saveContext();
}
EventBase::~EventBase() {
}
EventBase::~EventBase() {
@@
-614,7
+612,7
@@
bool EventBase::runLoopCallbacks() {
while (!currentCallbacks.empty()) {
LoopCallback* callback = ¤tCallbacks.front();
currentCallbacks.pop_front();
while (!currentCallbacks.empty()) {
LoopCallback* callback = ¤tCallbacks.front();
currentCallbacks.pop_front();
- folly::RequestContextScopeGuard rctx(
callback->context_
);
+ folly::RequestContextScopeGuard rctx(
std::move(callback->context_)
);
callback->runLoopCallback();
}
callback->runLoopCallback();
}