Re: Multithreading EOAccess
Ben Trumbull <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <a05111b02ba0053161962@[17.205.42.108]> |
Jon, Before 5.2, there was a global EOAccess lock. If you locked any EODatabaseContext, you locked all of EOAccess (more or less). As for the new locking methods, those classes now implement NSLocking. None of them have anything to do with EOModels. EOObjectStore is the abstract super class of various other classes, like EOEditingContext. EOEditingContext's new method lockObjectStore() secures the lock for the parent EOObjectStore of that EC. For normal ECs, this will be the EOObjectStoreCoordinator. The best way to lock an "EOF stack" is to grab the EOObjectStoreCoordinator's lock. To lock all database operations, you'd have to keep track of all the OSCs and lock them all. Since the model objects (like EOEntities) cache some information, you will probably experience difficulties changing the model after a fetch has occurred. We haven't gotten to conflicts with snapshots, or EO class properties. You're probably better off configuring things before any EOF operations take place, or creating a new EOModelGroup. -- -Ben