diff --git a/algorithms-iOS/algorithms-iOS/TXSubThreadMOC.m b/algorithms-iOS/algorithms-iOS/TXSubThreadMOC.m index d5071d3..c64d6d4 100644 --- a/algorithms-iOS/algorithms-iOS/TXSubThreadMOC.m +++ b/algorithms-iOS/algorithms-iOS/TXSubThreadMOC.m @@ -15,7 +15,7 @@ @implementation TXSubThreadMOC - (NSManagedObjectContext *)mocInitedOnSubThread { - NSAssert(dispatch_get_current_queue() != dispatch_get_main_queue(), @"This method should not be called from main queue"); + NSAssert(![NSThread isMainThread], @"This method should not be called from main queue"); if (mocInitedOnSubThread != nil) { return mocInitedOnSubThread;