Skip to content

Commit e5ae065

Browse files
Move concurrentSubscriptionPool property to MTRDeviceController_Concrete. (project-chip#36328)
The non-concrete case does not directly create subscriptions, so has no need of a pool for them.
1 parent d93f3f6 commit e5ae065

4 files changed

+8
-10
lines changed

src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#import <Matter/MTRDeviceStorageBehaviorConfiguration.h>
2727
#import <Matter/MTROTAProviderDelegate.h>
2828

29+
#import "MTRAsyncWorkQueue.h"
2930
#import "MTRDeviceConnectionBridge.h"
3031
#import "MTRDeviceControllerStartupParams_Internal.h"
3132

@@ -226,6 +227,12 @@ NS_ASSUME_NONNULL_BEGIN
226227
*/
227228
@property (readonly) chip::FabricIndex fabricIndex;
228229

230+
/**
231+
* A queue with a fixed width that allows a number of MTRDevice objects to perform
232+
* subscription at the same time.
233+
*/
234+
@property (nonatomic, readonly) MTRAsyncWorkQueue<MTRDeviceController *> * concurrentSubscriptionPool;
235+
229236
@end
230237

231238
NS_ASSUME_NONNULL_END

src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm

-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ @interface MTRDeviceController_Concrete ()
106106
@property (nonatomic, readonly, nullable) MTRAttestationTrustStoreBridge * attestationTrustStoreBridge;
107107
@property (nonatomic, readonly, nullable) NSMutableArray<MTRServerEndpoint *> * serverEndpoints;
108108

109-
@property (nonatomic, readonly) MTRAsyncWorkQueue<MTRDeviceController *> * concurrentSubscriptionPool;
110-
111109
@property (nonatomic, readonly) MTRDeviceStorageBehaviorConfiguration * storageBehaviorConfiguration;
112110

113111
// Whether we should be advertising our operational identity when we are not suspended.

src/darwin/Framework/CHIP/MTRDeviceController_Internal.h

-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
@class MTRDeviceControllerParameters;
4242
@class MTRDeviceControllerFactory;
4343
@class MTRDevice;
44-
@class MTRAsyncWorkQueue;
4544
@protocol MTRDevicePairingDelegate;
4645
@protocol MTRDeviceControllerDelegate;
4746
@class MTRDevice_Concrete;
@@ -78,12 +77,6 @@ NS_ASSUME_NONNULL_BEGIN
7877
@property (nonatomic, readonly, nullable) id<MTROTAProviderDelegate> otaProviderDelegate;
7978
@property (nonatomic, readonly, nullable) dispatch_queue_t otaProviderDelegateQueue;
8079

81-
/**
82-
* A queue with a fixed width that allows a number of MTRDevice objects to perform
83-
* subscription at the same time.
84-
*/
85-
@property (nonatomic, readonly) MTRAsyncWorkQueue<MTRDeviceController *> * concurrentSubscriptionPool;
86-
8780
/**
8881
* Fabric ID tied to controller
8982
*/

src/darwin/Framework/CHIP/MTRDevice_Concrete.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ - (void)_scheduleSubscriptionPoolWork:(dispatch_block_t)workBlock inNanoseconds:
12451245

12461246
workBlock();
12471247
}];
1248-
[self->_deviceController.concurrentSubscriptionPool enqueueWorkItem:workItem description:description];
1248+
[[[self _concreteController] concurrentSubscriptionPool] enqueueWorkItem:workItem description:description];
12491249
MTR_LOG("%@ - enqueued in the subscription pool", self);
12501250
};
12511251

0 commit comments

Comments
 (0)