Is this code safe to execute? That is, is it safe to add to a NSMutableArray or NSMutableDictionary concurrently?
- (NSArray *)batchProcess:(NSArray *)inputList {
NSMutableArray *outputList = [NSMutableArray arrayWithCapacity:inputList.count];
[inputList enumerateObjectsWithOptions:NSEnumerationConcurrent
usingBlock:^(id thing, NSUInteger index, BOOL *stop){
id processedThing = [self doProcessingOn:thing];
[outputList addObject:processedThing];
}];
return outputList;
}