[ReactNative] Move VSync bound events to JS thread

This commit is contained in:
Tadeu Zagallo committed 2015-04-22 07:01:48 -08:00
1 parent 462224727a
commit 3595b79ec3
5 files changed
+91 -50

No files matched your search

+7
View File
@@ -42,6 +42,13 @@ typedef void (^RCTJavaScriptCallback)(id json, NSError *error);
- (void)injectJSONText:(NSString *)script
asGlobalObjectNamed:(NSString *)objectName
callback:(RCTJavaScriptCompleteBlock)onComplete;
/**
* Enqueue a block to run in the executors JS thread. Fallback to `dispatch_async`
* on the main queue if the executor doesn't own a thread.
*/
- (void)executeBlockOnJavaScriptQueue:(dispatch_block_t)block;
@end
static const char *RCTJavaScriptExecutorID = "RCTJavaScriptExecutorID";