File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -374,10 +374,12 @@ public class NSOperationQueue : NSObject {
374
374
}
375
375
376
376
public func addOperations( ops: [ NSOperation ] , waitUntilFinished wait: Bool ) {
377
+ #if DEPLOYMENT_ENABLE_LIBDISPATCH
377
378
var waitGroup : dispatch_group_t ?
378
379
if wait {
379
380
waitGroup = dispatch_group_create ( )
380
381
}
382
+ #endif
381
383
/*
382
384
If OperationQueuePriority was not supported this could be much faster
383
385
since it would not need to have the extra book-keeping for managing a priority
@@ -527,6 +529,7 @@ public class NSOperationQueue : NSObject {
527
529
static let OperationQueueKey = UnsafePointer < Void > ( UnsafeMutablePointer < Void > ( allocatingCapacity: 1 ) )
528
530
529
531
public class func currentQueue( ) -> NSOperationQueue ? {
532
+ #if DEPLOYMENT_ENABLE_LIBDISPATCH
530
533
let specific = dispatch_get_specific ( NSOperationQueue . OperationQueueKey)
531
534
if specific == nil {
532
535
if pthread_main_np ( ) == 1 {
@@ -537,6 +540,9 @@ public class NSOperationQueue : NSObject {
537
540
} else {
538
541
return Unmanaged < NSOperationQueue > . fromOpaque ( unsafeBitCast ( specific, to: OpaquePointer . self) ) . takeUnretainedValue ( )
539
542
}
543
+ #else
544
+ return nil
545
+ #endif
540
546
}
541
547
542
548
public class func mainQueue( ) -> NSOperationQueue {
You can’t perform that action at this time.
0 commit comments