diff --git a/packages/react-native/React/Base/RCTBridgeModule.h b/packages/react-native/React/Base/RCTBridgeModule.h index 6cce052695714e..e0500b6c719dd5 100644 --- a/packages/react-native/React/Base/RCTBridgeModule.h +++ b/packages/react-native/React/Base/RCTBridgeModule.h @@ -151,27 +151,17 @@ RCT_EXTERN_C_END @property (nonatomic, weak, readonly) RCTBridge *bridge RCT_DEPRECATED; /** - * The queue that will be used to call all exported methods. If omitted, this - * will call on a default background queue, which is avoids blocking the main - * thread. - * - * If the methods in your module need to interact with UIKit methods, they will - * probably need to call those on the main thread, as most of UIKit is main- - * thread-only. You can tell React Native to call your module methods on the - * main thread by returning a reference to the main queue, like this: - * - * - (dispatch_queue_t)methodQueue - * { - * return dispatch_get_main_queue(); - * } - * - * If you don't want to specify the queue yourself, but you need to use it - * inside your class (e.g. if you have internal methods that need to dispatch - * onto that queue), you can just add `@synthesize methodQueue = _methodQueue;` - * and the bridge will populate the methodQueue property for you automatically - * when it initializes the module. + * This property is deprecated. This selector used to support two functionalities. + * + * 1) Providing a queue to do additional async work. + * Instead of synthesizing this selector, retrieve a queue from GCD to do any asynchronous work. + * Example: _myQueue = dispatch_queue_create("myQueue", DISPATCH_QUEUE_SERIAL); + * + * 2) Overriding this in order to run all the module's methods on a specific queue, usually main. + * Instead of overriding this, directly dispatch the code onto main queue when necessary. + * Example: dispatch_async(dispatch_get_main_queue, ^{ ... }); */ -@property (nonatomic, strong, readonly) dispatch_queue_t methodQueue; +@property (nonatomic, strong, readonly) dispatch_queue_t methodQueue RCT_DEPRECATED; /** * Wrap the parameter line of your method implementation with this macro to