folly::fibers::Fiber: use folly::Function instead of std::function
authorSven Over <over@fb.com>
Wed, 6 Apr 2016 10:55:14 +0000 (03:55 -0700)
committerFacebook Github Bot 7 <facebook-github-bot-7-bot@fb.com>
Wed, 6 Apr 2016 11:05:49 +0000 (04:05 -0700)
commit177753d98f88313a80c8a02e5c3e96eeb7745b33
tree1d9ad331141f4462cb0546bc043fb14a26d33f99
parentedf8f25a1c112e84951a969061f58670cb44bd22
folly::fibers::Fiber: use folly::Function instead of std::function

Summary:We are jumping through some ugly hoops in the implementation of
fibers to allow for non-copyable functors/lambdas. We can get rid of
those by using folly::Function instead of std::function to store
functions in folly::fibers::Fiber.

This involves one observable interface change: the virtual function
folly::fibers::InlineFunctionRunner::run must take a
folly::Function<void()> argument instead of a std::function<void()>.

Reviewed By: andriigrynenko

Differential Revision: D3102711

fb-gh-sync-id: 56705b972dc24cc0da551109ed44732b97cb6e13
fbshipit-source-id: 56705b972dc24cc0da551109ed44732b97cb6e13
folly/experimental/fibers/Fiber.h
folly/experimental/fibers/FiberManager-inl.h
folly/experimental/fibers/FiberManager.h