folly::FunctionScheduler: replace std::function w/ folly::Function
Summary:By using folly::Function instead of std::function to internally store
functions in FunctionScheduler, this diff allows users to pass
non-copyable lambdas to FunctionScheduler::addFunction.
All exisiting unit tests still pass. Also, passing std::function to
addFunction still works, as the std::function will be implicitly
converted (i.e. wrapped) in a folly::Function. However, this implies
a performance penalty.
Reviewed By: fugalh
Differential Revision:
D3092944
fb-gh-sync-id:
1e8081e70d4717025f2eadbb6b6da173460d4373
fbshipit-source-id:
1e8081e70d4717025f2eadbb6b6da173460d4373