react-native/React
Valentin Shergin a7468a4acf Introducing smart `RCTUnsafeExecuteOnMainQueueOnceSync()` and fixed `RCTScreenScale()`
Summary:
(This diff was decoupled from D4983054 which landing was quite delayed.)

`RCTUnsafeExecuteOnMainQueueOnceSync()` synchronously executes a block once, on main queue.
I found that our old implementation of `RCTScreenScale()` causes deadlock when it is called from main and background thread simultaneously.
After I implemented my own solution I googled this issue and found an article by Ben Alpert with this awesome helper:
https://benalpert.com/2014/04/02/dispatch-once-initialization-on-the-main-thread.html
So, I found it super useful and borrowed it.

Hey spicyj! :)

Reviewed By: fkgozali

Differential Revision: D5632592

fbshipit-source-id: dff43a5780b7404a3cc109c66c131cef4f4df429
2017-08-15 14:25:23 -07:00
..
Base Introducing smart `RCTUnsafeExecuteOnMainQueueOnceSync()` and fixed `RCTScreenScale()` 2017-08-15 14:25:23 -07:00
CxxBridge Implement lazy discovery scaffolding for loading NativeModules on demand. 2017-08-11 06:41:33 -07:00
CxxModule Fix format specifier used in RCTCxxMethod 2017-08-08 11:55:17 -07:00
CxxUtils More efficient dynamic->NSString conversion. 2017-07-26 18:31:12 -07:00
DevSupport Force the debugger to disconnect before a bundle reload 2017-08-14 08:16:52 -07:00
Executors Add more information to `__fbBatchedBridge is undefined` error 2017-07-26 11:21:59 -07:00
Inspector Force the debugger to disconnect before a bundle reload 2017-08-14 08:16:52 -07:00
Modules Fix format specifier used in RCTUIManager 2017-08-09 04:25:08 -07:00
Profiler Configure requiresMainQueueSetup for core modules 2017-08-07 07:04:36 -07:00
React.xcodeproj Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
ReactLegacy.xcodeproj Add support for Cxx objects as arguments to native modules 2017-08-14 05:22:17 -07:00
Views Apple TV: RCTTabBar selection controlled by native after render (fix #15081) 2017-08-10 05:36:06 -07:00
third-party.xcconfig More attempts to fix Travis CI runs 2017-05-10 04:32:54 -07:00