iOS: Ensure that rendering operations are serialized to prevent timing errors

This commit is contained in:
pengfei.zhou
2022-07-27 14:28:08 +08:00
committed by osborn
parent 5dd7504a37
commit 81137b8fb8
4 changed files with 62 additions and 46 deletions

View File

@@ -25,10 +25,21 @@
#import "DoricPromise.h"
#import "DoricRegistry.h"
typedef NS_ENUM(NSUInteger, DoricThreadMode) {
DoricThreadModeUI = 1,
DoricThreadModeJS = 2,
DoricThreadModeIndependent = 3,
};
NS_ASSUME_NONNULL_BEGIN
@interface DoricNativePlugin : DoricContextHolder
/**
* Determines which thread this method should run on
* @param method name of method
* @return thread where this method should run on,default is DoricThreadModeIndependent
* */
- (DoricThreadMode)threadMode:(NSString *)method;
@end
NS_ASSUME_NONNULL_END