projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix mem leak
[folly.git]
/
folly
/
io
/
async
/
EventBase.cpp
diff --git
a/folly/io/async/EventBase.cpp
b/folly/io/async/EventBase.cpp
index a3e5bdc92fd96b6b4bcd133e0f728d908310f069..d901650650fd59e6f70dd17dbd03f7de9e8fa844 100644
(file)
--- a/
folly/io/async/EventBase.cpp
+++ b/
folly/io/async/EventBase.cpp
@@
-521,7
+521,7
@@
void EventBase::runInLoop(Cob&& cob, bool thisIteration) {
}
void EventBase::runOnDestruction(LoopCallback* callback) {
-
DCHECK(isInEventBaseThread()
);
+
std::lock_guard<std::mutex> lg(onDestructionCallbacksMutex_
);
callback->cancelLoopCallback();
onDestructionCallbacks_.push_back(*callback);
}