Commit e8308aaf authored by Sven Over's avatar Sven Over Committed by Facebook Github Bot 7

fix folly::NotificationQueue for move-only value types

Summary:
folly::NotificationQueue::tryConsume did not compile for
move-only types such as folly::Function. This diff fixes that.

Reviewed By: andriigrynenko

Differential Revision: D3711406

fbshipit-source-id: a52eba3eb31743165e4726f830f2a38d241f25a5
parent 4cf30a14
......@@ -422,9 +422,9 @@ class NotificationQueue {
return false;
}
auto data = std::move(queue_.front());
result = data.first;
RequestContext::setContext(data.second);
auto& data = queue_.front();
result = std::move(data.first);
RequestContext::setContext(std::move(data.second));
queue_.pop_front();
......
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