Passing a ManagedContext with Core Date + Magical Record

后端 未结 2 1803
被撕碎了的回忆
被撕碎了的回忆 2021-01-15 14:16

Currently I\'m setting my NSManagedContext\'s by doing the following in ViewDidLoad:

.h

@property (nonatomic,strong) NSManagedObject         


        
2条回答
  •  被撕碎了的回忆
    2021-01-15 15:10

    Please stop using contextForCurrentThread. This goes doubly for using GCD queues. While GCD queues are implemented on top of the threading model, you are not guaranteed to get the same actual thread for every subsequent block.

    If you need a new context, create a new private queue, main queue, or confinement context.

提交回复
热议问题