阅读背景:

核心数据——在多个线程之间共享nsmanagedobject

来源:互联网 

I suffered all the consequences of using a single MOC in multiple threads - my app crashes at random points because the MOC is created in the main thread and I also use it to fill the DB in another thread. Though the code is synchronized (@synchronize) using a global singleton the app crashes. I read that using a separate MOC for each thread will make things ok but I also read that it is considered also a bad approach to share NSManagedObjects across threads.I suffered all the consequences of using a sing




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: