react-native-macos/ReactCommon/callinvoker
Ramanpreet Nara de56649430 Add CallInvoker::invokeSync
Summary:
We'll be using a native CallInvoker to dispatch sync and async method calls to ObjC NativeModules. This native CallInvoker will hold a reference to the ObjC NativeModule's method queue.

**Why is the native CallInvoker required for ObjC NativeModules?**
In the case where the ObjC NativeModule neither provides nor requests a method queue, we must create a method queue for it. When we go to invoke a method from JS, for these NativeModules specifically, there is no way to access this method queue. A native CallInvoker is a convenient abstraction that holds on to that method queue. For async calls, we'll just call `CallInvoker::invokeAsync`, and for sync calls, we'll just call `CallInvoker::invokeSync`.

**Why do we need sync call support for native `CallInvoker`?**
In ObjC, sync NativeModule method calls block the JS thread, then execute synchronously on the NativeModule's method queue, and then unblock the JS thread. This is what'll be implemented by `CallInvoker::invokeSync`.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D20829955

fbshipit-source-id: efb9d5408a1ade81069a943c865f232d4d10acfe
2020-04-03 09:47:42 -07:00
..
ReactCommon Add CallInvoker::invokeSync 2020-04-03 09:47:42 -07:00
.clang-tidy The life-changing magic of clang-tidying up 2020-02-04 11:09:30 -08:00
Android.mk Get CallInvokers from the bridge 2020-04-01 11:39:18 -07:00
BUCK Get CallInvokers from the bridge 2020-04-01 11:39:18 -07:00
React-callinvoker.podspec Get CallInvokers from the bridge 2020-04-01 11:39:18 -07:00