mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-24 10:21:40 +01:00
WIP: object concurrency debugging utilities
This commit is contained in:
@@ -47,6 +47,11 @@ public enum LogLevel {
|
||||
*/
|
||||
public protocol CoreStoreLogger {
|
||||
|
||||
/**
|
||||
When `true`, all `NSManagedObject` attribute and relationship access will raise an assertion when executed on the wrong transaction/datastack queue. Defaults to `false` if not implemented.
|
||||
*/
|
||||
var enableObjectConcurrencyDebugging: Bool { get set }
|
||||
|
||||
/**
|
||||
Handles log messages sent by the `CoreStore` framework.
|
||||
|
||||
@@ -94,6 +99,12 @@ public protocol CoreStoreLogger {
|
||||
|
||||
extension CoreStoreLogger {
|
||||
|
||||
public var enableObjectConcurrencyDebugging: Bool {
|
||||
|
||||
get { return false }
|
||||
set {}
|
||||
}
|
||||
|
||||
public func abort(_ message: String, fileName: StaticString, lineNumber: Int, functionName: StaticString) {
|
||||
|
||||
Swift.fatalError(message, file: fileName, line: UInt(lineNumber))
|
||||
|
||||
Reference in New Issue
Block a user