0
我需要更新Core Data中每个排列对象的值,并且我正在使用循环。但是我想知道下面的代码是否是线程安全的,并且为什么。同时枚举核心数据中的管理对象线程安全
ManagedObjectContext不是线程安全的,解释here
[myArrayController.arrangedObjects enumerateObjectsWithOptions:NSEnumerationConcurrent
usingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
// do some work
[obj setValue:@"some value" forKey:@"aKey"];
}]