Skip to content

Commit

Permalink
More tweaks from review
Browse files Browse the repository at this point in the history
  • Loading branch information
ksperling-apple committed Sep 28, 2023
1 parent 315226c commit 6b9a406
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/darwin/Framework/CHIP/MTRAsyncWorkQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ MTR_TESTABLE
/// Note: This handler is NOT called on the dispatch queue associated with
/// this work item. Thread-safety is managed by the work queue internally.
///
/// If no `batchingHandler` is set using this method, the work item will not
/// participate in batching, and the `batchingID` and `batchableData`
/// properties are meaningless.
///
/// @see MTRAsyncWorkBatchingHandler
- (void)setBatchingID:(NSUInteger)opaqueBatchingID
data:(id)opaqueBatchableData
Expand All @@ -143,6 +147,10 @@ MTR_TESTABLE
/// Note: This handler is NOT called on the dispatch queue associated with
/// this work item. Thread-safety is managed by the work queue internally.
///
/// If no `duplicateCheckHandler` is set using this method, the work item
/// will not participate in duplicate checking, and the `duplicateTypeID`
/// property is meaningless.
///
/// @see MTRAsyncWorkDuplicateCheckHandler
- (void)setDuplicateTypeID:(NSUInteger)opaqueDuplicateTypeID
handler:(MTRAsyncWorkDuplicateCheckHandler)duplicateCheckHandler;
Expand Down
3 changes: 2 additions & 1 deletion src/darwin/Framework/CHIP/MTRAsyncWorkQueue.mm
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ - (void)enqueueWorkItem:(MTRAsyncWorkItem *)item

- (void)invalidate
{
NSString * contextDescription = [_context description]; // outside of lock
os_unfair_lock_lock(&_lock);
MTR_LOG_INFO("MTRAsyncWorkQueue<%@> invalidate %tu items", _context, _items.count);
MTR_LOG_INFO("MTRAsyncWorkQueue<%@> invalidate %tu items", contextDescription, _items.count);
for (MTRAsyncWorkItem * item in _items) {
[item cancel];
}
Expand Down

0 comments on commit 6b9a406

Please sign in to comment.