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 {
546546 }
547547
548548 public class func mainQueue( ) -> NSOperationQueue {
549+ #if DEPLOYMENT_ENABLE_LIBDISPATCH
549550 let specific = dispatch_queue_get_specific ( dispatch_get_main_queue ( ) , NSOperationQueue . OperationQueueKey)
550551 if specific == nil {
551- #if DEPLOYMENT_ENABLE_LIBDISPATCH
552552 return NSOperationQueue ( _queue: dispatch_get_main_queue ( ) , maxConcurrentOperations: 1 )
553- #else
554- fatalError ( " NSOperationQueue requires libdispatch " )
555- #endif
556553 } else {
557554 return Unmanaged < NSOperationQueue > . fromOpaque ( unsafeBitCast ( specific, to: OpaquePointer . self) ) . takeUnretainedValue ( )
558555 }
556+ #else
557+ fatalError ( " NSOperationQueue requires libdispatch " )
558+ #endif
559559 }
560560}
You can’t perform that action at this time.
0 commit comments