mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
ship shared module queue (#44916)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44916 Changelog: [Internal] reached ship decision last year, getting rid of the gating here Reviewed By: javache Differential Revision: D58476997 fbshipit-source-id: 0ad52d29ac79b1751d6f10e67dc6886bf88e5ba4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f7aea0c8e1
commit
b19bf2b6d7
@@ -61,10 +61,6 @@ void RCTEnableFabricInteropLayer(BOOL enabled);
|
||||
BOOL RCTTurboModuleSyncVoidMethodsEnabled(void);
|
||||
void RCTEnableTurboModuleSyncVoidMethods(BOOL enabled);
|
||||
|
||||
// Use a shared queue for executing module methods
|
||||
BOOL RCTTurboModuleSharedQueueEnabled(void);
|
||||
void RCTEnableTurboModuleSharedQueue(BOOL enabled);
|
||||
|
||||
BOOL RCTUIManagerDispatchAccessibilityManagerInitOntoMain(void);
|
||||
void RCTUIManagerSetDispatchAccessibilityManagerInitOntoMain(BOOL enabled);
|
||||
|
||||
|
||||
@@ -167,18 +167,6 @@ void RCTEnableTurboModuleSyncVoidMethods(BOOL enabled)
|
||||
gTurboModuleEnableSyncVoidMethods = enabled;
|
||||
}
|
||||
|
||||
// Use a shared queue for executing module methods
|
||||
static BOOL gTurboModuleEnableSharedQueue = NO;
|
||||
BOOL RCTTurboModuleSharedQueueEnabled(void)
|
||||
{
|
||||
return gTurboModuleEnableSharedQueue;
|
||||
}
|
||||
|
||||
void RCTEnableTurboModuleSharedQueue(BOOL enabled)
|
||||
{
|
||||
gTurboModuleEnableSharedQueue = enabled;
|
||||
}
|
||||
|
||||
BOOL kDispatchAccessibilityManagerInitOntoMain = NO;
|
||||
BOOL RCTUIManagerDispatchAccessibilityManagerInitOntoMain(void)
|
||||
{
|
||||
|
||||
+2
-12
@@ -217,7 +217,6 @@ typedef struct {
|
||||
RCTBridgeProxy *_bridgeProxy;
|
||||
RCTBridgeModuleDecorator *_bridgeModuleDecorator;
|
||||
|
||||
BOOL _enableSharedModuleQueue;
|
||||
dispatch_queue_t _sharedModuleQueue;
|
||||
}
|
||||
|
||||
@@ -234,11 +233,7 @@ typedef struct {
|
||||
_bridgeProxy = bridgeProxy;
|
||||
_bridgeModuleDecorator = bridgeModuleDecorator;
|
||||
_invalidating = false;
|
||||
_enableSharedModuleQueue = RCTTurboModuleSharedQueueEnabled();
|
||||
|
||||
if (_enableSharedModuleQueue) {
|
||||
_sharedModuleQueue = dispatch_queue_create("com.meta.react.turbomodulemanager.queue", DISPATCH_QUEUE_SERIAL);
|
||||
}
|
||||
_sharedModuleQueue = dispatch_queue_create("com.meta.react.turbomodulemanager.queue", DISPATCH_QUEUE_SERIAL);
|
||||
|
||||
if (RCTTurboModuleInteropEnabled()) {
|
||||
// TODO(T174674274): Implement lazy loading of legacy modules in the new architecture.
|
||||
@@ -728,12 +723,7 @@ typedef struct {
|
||||
* following if condition's block.
|
||||
*/
|
||||
if (!methodQueue) {
|
||||
if (_enableSharedModuleQueue) {
|
||||
methodQueue = _sharedModuleQueue;
|
||||
} else {
|
||||
NSString *methodQueueName = [NSString stringWithFormat:@"com.facebook.react.%sQueue", moduleName];
|
||||
methodQueue = dispatch_queue_create(methodQueueName.UTF8String, DISPATCH_QUEUE_SERIAL);
|
||||
}
|
||||
methodQueue = _sharedModuleQueue;
|
||||
|
||||
if (moduleHasMethodQueueGetter) {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user