From 9ff27587a8660232869350ba0fdf424a949f42a5 Mon Sep 17 00:00:00 2001 From: Sven Over Date: Tue, 20 Sep 2016 15:04:07 -0700 Subject: [PATCH] use folly::Function in folly::Executor interface Summary: This diff changes the definition of `folly::Func` from `std::function` over to `folly::Function`. This mostly affects the interface of `folly::Executor` and derived and related classes. By using `folly::Function`, we allow to have lambdas capturing move-only types passed to executors. This continues an effort to get rid of the potentially dangerous `folly::MoveWrapper` by allowing to capture move-only types in lambdas when using `folly::Future`, `folly::EventBase` and now `folly::Executor`. Reviewed By: yfeldblum Differential Revision: D3706449 fbshipit-source-id: 11c2cee32cb9f0298c39b7b1695a477777eeb3aa --- folly/Executor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/folly/Executor.h b/folly/Executor.h index 6038ee62..89e684e6 100644 --- a/folly/Executor.h +++ b/folly/Executor.h @@ -21,9 +21,11 @@ #include #include +#include + namespace folly { -typedef std::function Func; +using Func = Function; /// An Executor accepts units of work with add(), which should be /// threadsafe. -- 2.34.1