File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -546,15 +546,15 @@ public class NSOperationQueue : NSObject {
546
546
}
547
547
548
548
public class func mainQueue( ) -> NSOperationQueue {
549
+ #if DEPLOYMENT_ENABLE_LIBDISPATCH
549
550
let specific = dispatch_queue_get_specific ( dispatch_get_main_queue ( ) , NSOperationQueue . OperationQueueKey)
550
551
if specific == nil {
551
- #if DEPLOYMENT_ENABLE_LIBDISPATCH
552
552
return NSOperationQueue ( _queue: dispatch_get_main_queue ( ) , maxConcurrentOperations: 1 )
553
- #else
554
- fatalError ( " NSOperationQueue requires libdispatch " )
555
- #endif
556
553
} else {
557
554
return Unmanaged < NSOperationQueue > . fromOpaque ( unsafeBitCast ( specific, to: OpaquePointer . self) ) . takeUnretainedValue ( )
558
555
}
556
+ #else
557
+ fatalError ( " NSOperationQueue requires libdispatch " )
558
+ #endif
559
559
}
560
560
}
You can’t perform that action at this time.
0 commit comments