Commit 25612675 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Fix move-of-const in ThreadWheelTimekeeper

Summary: [Folly] Fix move-of-const in `ThreadWheelTimekeeper`.

Reviewed By: capickett

Differential Revision: D9950653

fbshipit-source-id: 76d45cdac1026c41de73489936c4afdac3f57fd7
parent 2f214cc1
......@@ -81,7 +81,8 @@ struct WTCallback : public std::enable_shared_from_this<WTCallback>,
// This is not racing with timeoutExpired anymore because this is called
// through Future, which means Core is still alive and keeping a ref count
// on us, so what timeouExpired is doing won't make the object go away
base_->runInEventBaseThread([me = shared_from_this(), ew = std::move(ew)] {
base_->runInEventBaseThread(
[me = shared_from_this(), ew = std::move(ew)]() mutable {
me->cancelTimeout();
// Don't need Promise anymore, break the circular reference
auto promise = me->stealPromise();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment