mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-23 01:49:15 +01:00
changed concurrency architecture. Transactions are now done on a direct child context of the root saving context (instead of a main context child)
This commit is contained in:
@@ -41,7 +41,7 @@ public extension DataStack {
|
||||
public func performTransaction(closure: (transaction: AsynchronousDataTransaction) -> Void) {
|
||||
|
||||
AsynchronousDataTransaction(
|
||||
mainContext: self.mainContext,
|
||||
mainContext: self.rootSavingContext,
|
||||
queue: self.childTransactionQueue,
|
||||
closure: closure).perform()
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public extension DataStack {
|
||||
public func performTransactionAndWait(closure: (transaction: SynchronousDataTransaction) -> Void) -> SaveResult? {
|
||||
|
||||
return SynchronousDataTransaction(
|
||||
mainContext: self.mainContext,
|
||||
mainContext: self.rootSavingContext,
|
||||
queue: self.childTransactionQueue,
|
||||
closure: closure).performAndWait()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user