react-native-macos/ReactCommon/utils
Valentin Shergin 5e0b5ff7cc Fabric: Introducing SharedFunction
Summary:
`SharedFunction` implements a pattern of a shared callable object that contains the same executable inside. It's similar to  `std::function` with one important difference: when the object is copied, the stored function (and captured values) are shared between instances (not copied).
`SharedFunction` can be stored inside `std::function` because it's callable.
It useful in some scenarios, such as:
 * When captured by `std::function` arguments are not copyable;
 * When we need to replace the content of the callable later on the go.

We will use it in the coming diffs.

Reviewed By: mdvacca

Differential Revision: D14072078

fbshipit-source-id: 9df4ad2d1b92394e2dfef5c283f35c7c0bd4b500
2019-02-14 20:09:16 -08:00
..
BUCK Fabric: Introducing SharedFunction 2019-02-14 20:09:16 -08:00
FloatComparison.h Fabric: Introducing SharedFunction 2019-02-14 20:09:16 -08:00
SharedFunction.h Fabric: Introducing SharedFunction 2019-02-14 20:09:16 -08:00