@@ -225,18 +225,11 @@ - (instancetype)initWithContext:(id)context
225
225
return self;
226
226
}
227
227
228
- - (NSString *)_lockedSelfDescription : (const ContextSnapshot &)context
229
- {
230
- os_unfair_lock_assert_owner (&_lock);
231
-
232
- return [NSString stringWithFormat: @" %@ , items count: %tu " , context.description, _items.count];
233
- }
234
-
235
228
- (NSString *)description
236
229
{
237
230
ContextSnapshot context (self);
238
231
std::lock_guard lock (_lock);
239
- return [NSString stringWithFormat: @" <%@ context: %@ >" , self .class , [ self _lockedSelfDescription: context] ];
232
+ return [NSString stringWithFormat: @" <%@ context: %@ , items count: %tu >" , self .class , context.description, _items.count ];
240
233
}
241
234
242
235
- (void )enqueueWorkItem : (MTRAsyncWorkItem *)item
@@ -268,9 +261,9 @@ - (void)enqueueWorkItem:(MTRAsyncWorkItem *)item
268
261
// Logging the description once is enough because other log messages
269
262
// related to the work item (execution, completion etc) can easily be
270
263
// correlated using the unique id.
271
- MTR_LOG_DEFAULT (" MTRAsyncWorkQueue<%@> enqueued work item [%llu]: %@" , [ self _lockedSelfDescription: context] , item.uniqueID , description);
264
+ MTR_LOG_DEFAULT (" MTRAsyncWorkQueue<%@, items count: %tu > enqueued work item [%llu]: %@" , context. description , _items. count , item.uniqueID , description);
272
265
} else {
273
- MTR_LOG_DEFAULT (" MTRAsyncWorkQueue<%@> enqueued work item [%llu]" , [ self _lockedSelfDescription: context] , item.uniqueID );
266
+ MTR_LOG_DEFAULT (" MTRAsyncWorkQueue<%@, items count: %tu > enqueued work item [%llu]" , context. description , _items. count , item.uniqueID );
274
267
}
275
268
276
269
[self _callNextReadyWorkItemWithContext: context];
@@ -304,7 +297,7 @@ - (void)_postProcessWorkItem:(MTRAsyncWorkItem *)workItem
304
297
} else {
305
298
[workItem markComplete ];
306
299
[_items removeObjectAtIndex: 0 ];
307
- MTR_LOG_DEFAULT (" MTRAsyncWorkQueue<%@> completed work item [%llu]" , [ self _lockedSelfDescription: context] , workItem.uniqueID );
300
+ MTR_LOG_DEFAULT (" MTRAsyncWorkQueue<%@, items count: %tu > completed work item [%llu]" , context. description , _items. count , workItem.uniqueID );
308
301
}
309
302
310
303
// when "concurrency width" is implemented this will be decremented instead
0 commit comments