use folly::Function<void()> in folly::Executor interface
authorSven Over <over@fb.com>
Tue, 20 Sep 2016 22:04:07 +0000 (15:04 -0700)
committerFacebook Github Bot 6 <facebook-github-bot-6-bot@fb.com>
Tue, 20 Sep 2016 22:08:49 +0000 (15:08 -0700)
commit9ff27587a8660232869350ba0fdf424a949f42a5
tree71540a1195fa631a5fc4d1aadd7b612756757078
parent6a5f4337df0cc9faad63b1e02753e8c6d98655c5
use folly::Function<void()> in folly::Executor interface

Summary:
This diff changes the definition of `folly::Func` from `std::function<void()>`
over to `folly::Function<void()>`. This mostly affects the interface of
`folly::Executor` and derived and related classes. By using
`folly::Function<void()>`, 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