Re: Loading NSManagedObjects across NSManagedObjectContexts in an unsaved NSPersistentDocument
Re: Loading NSManagedObjects across NSManagedObjectContexts in an unsaved NSPersistentDocument
- Subject: Re: Loading NSManagedObjects across NSManagedObjectContexts in an unsaved NSPersistentDocument
- From: vincent habchi <email@hidden>
- Date: Mon, 22 Nov 2010 07:26:48 +0100
Le 22 nov. 2010 à 00:38, Dave Zwerdling <email@hidden> a écrit :
> I have a fetcher which provides managed objects into the persistent store. I also have a class which needs to read the objects from another MOC because it is being run in a background thread.
You've somehow run into the same issue than me. At that point, there are, I think, two possibilities:
1. Use a single MOC and its provided mutex for accessing shared ressources (but this is strongly discouraged);
2. Create a private pool of memory in which you duplicate new objects until they are saved.
Vincent
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden