NSDictionary snapshot = (NSDictionary)snapshotsEnumerator.nextElement(); EOGlobalID globalID = entity.globalIDForRow(snapshot); EODatabaseContext._EOAssertSafeMultiThreadedAccess(dbc); dbc.lock();  try { processor.processSnapshotForGlobalID(database, snapshot, globalID); } finally { dbc.unlock(); }
NSDictionary snapshot = (NSDictionary)snapshotsEnumerator.nextElement(); EOGlobalID globalID = entity.globalIDForRow(snapshot); snapshotsByGlobalID.setObjectForKey(snapshot, globalID); } if(snapshotsByGlobalID.count() > 0) { EODatabaseContext._EOAssertSafeMultiThreadedAccess(dbc); dbc.lock();  try { processor.processSnapshots(database, snapshotsByGlobalID); } finally { dbc.unlock(); }
        private void process(EOObjectStoreCoordinator sender, SnapshotProcessor processor, NSDictionary changesByEntity) {            NSMutableDictionary dbcs = new NSMutableDictionary();            for (Enumeration oscs = _synchronizer.coordinators(); oscs.hasMoreElements(); ) {                EOObjectStoreCoordinator osc = (EOObjectStoreCoordinator) oscs.nextElement();                if (osc != sender) {                    for(Enumeration entityNames = changesByEntity.allKeys().objectEnumerator(); entityNames.hasMoreElements();) {                        String entityName = (String)entityNames.nextElement();                        EOEntity entity = EOModelGroup.modelGroupForObjectStoreCoordinator(sender).entityNamed(entityName);                        NSArray snapshots = (NSArray)changesByEntity.objectForKey(entityName);                        EODatabaseContext dbc = (EODatabaseContext) dbcs.objectForKey(entityName);                        if(dbc == null) {                            dbc = ERXEOAccessUtilities.databaseContextForEntityNamed(osc,entityName);                            dbcs.setObjectForKey(dbc, entityName);                        }                        EODatabase database = dbc.database();                        for(Enumeration snapshotsEnumerator = snapshots.objectEnumerator(); snapshotsEnumerator.hasMoreElements(); ) {                            NSDictionary snapshot = (NSDictionary)snapshotsEnumerator.nextElement();                            EOGlobalID globalID = entity.globalIDForRow(snapshot);                            EODatabaseContext._EOAssertSafeMultiThreadedAccess(dbc);                            dbc.lock();                                                        try {                                processor.processSnapshotForGlobalID(database, snapshot, globalID);                            } finally {                                dbc.unlock();                            }                        }                    }                }            }        }