diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h index 6e6e504d475295..0f2b113af248aa 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h @@ -26,6 +26,7 @@ #import #import +#import "MTRAsyncWorkQueue.h" #import "MTRDeviceConnectionBridge.h" #import "MTRDeviceControllerStartupParams_Internal.h" @@ -226,6 +227,12 @@ NS_ASSUME_NONNULL_BEGIN */ @property (readonly) chip::FabricIndex fabricIndex; +/** + * A queue with a fixed width that allows a number of MTRDevice objects to perform + * subscription at the same time. + */ +@property (nonatomic, readonly) MTRAsyncWorkQueue * concurrentSubscriptionPool; + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm index 1a164e50b14b5c..4dfffcbb8907b3 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm @@ -106,8 +106,6 @@ @interface MTRDeviceController_Concrete () @property (nonatomic, readonly, nullable) MTRAttestationTrustStoreBridge * attestationTrustStoreBridge; @property (nonatomic, readonly, nullable) NSMutableArray * serverEndpoints; -@property (nonatomic, readonly) MTRAsyncWorkQueue * concurrentSubscriptionPool; - @property (nonatomic, readonly) MTRDeviceStorageBehaviorConfiguration * storageBehaviorConfiguration; // Whether we should be advertising our operational identity when we are not suspended. diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h index 102eaa4af916db..6a8539d980c1f3 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h @@ -41,7 +41,6 @@ @class MTRDeviceControllerParameters; @class MTRDeviceControllerFactory; @class MTRDevice; -@class MTRAsyncWorkQueue; @protocol MTRDevicePairingDelegate; @protocol MTRDeviceControllerDelegate; @class MTRDevice_Concrete; @@ -78,12 +77,6 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly, nullable) id otaProviderDelegate; @property (nonatomic, readonly, nullable) dispatch_queue_t otaProviderDelegateQueue; -/** - * A queue with a fixed width that allows a number of MTRDevice objects to perform - * subscription at the same time. - */ -@property (nonatomic, readonly) MTRAsyncWorkQueue * concurrentSubscriptionPool; - /** * Fabric ID tied to controller */ diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm index 61e8ab68ea89f8..a613240fd76fa3 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm @@ -1245,7 +1245,7 @@ - (void)_scheduleSubscriptionPoolWork:(dispatch_block_t)workBlock inNanoseconds: workBlock(); }]; - [self->_deviceController.concurrentSubscriptionPool enqueueWorkItem:workItem description:description]; + [[[self _concreteController] concurrentSubscriptionPool] enqueueWorkItem:workItem description:description]; MTR_LOG("%@ - enqueued in the subscription pool", self); };