always dispatch completion right after adding a store to the coordinator (allow stores to fully complete their run loop)

This commit is contained in:
John Estropia
2016-11-17 16:27:28 +09:00
parent 2b37daefe0
commit 92756fec42

View File

@@ -239,7 +239,10 @@ public extension DataStack {
_ = try self.addStorageAndWait(storage)
completion(SetupResult(storage))
DispatchQueue.main.async {
completion(SetupResult(storage))
}
}
catch {