@@ -65,7 +65,7 @@ open class Operation: NSObject {
65
65
// The completion block property is a bit cagey and can not be executed locally on the queue due to thread exhaust potentials.
66
66
// This sets up for some strange behavior of finishing operations since the handler will be executed on a different queue
67
67
if let completion = completionBlock {
68
- DispatchQueue . global ( attributes : . qosBackground ) . async { ( ) -> Void in
68
+ DispatchQueue . global ( qos : . background ) . async { ( ) -> Void in
69
69
completion ( )
70
70
}
71
71
}
@@ -326,9 +326,9 @@ open class OperationQueue: NSObject {
326
326
} else {
327
327
effectiveName = " NSOperationQueue:: \( Unmanaged . passUnretained ( self ) . toOpaque ( ) ) "
328
328
}
329
- let attr : DispatchQueueAttributes
329
+ let attr : DispatchQueue . Attributes
330
330
if maxConcurrentOperationCount == 1 {
331
- attr = . serial
331
+ attr = [ ]
332
332
} else {
333
333
attr = . concurrent
334
334
if maxConcurrentOperationCount != NSOperationQueueDefaultMaxConcurrentOperationCount {
@@ -408,7 +408,7 @@ open class OperationQueue: NSObject {
408
408
group. enter ( )
409
409
}
410
410
411
- let block = DispatchWorkItem ( group : queueGroup , flags: . enforceQoS) { ( ) -> Void in
411
+ let block = DispatchWorkItem ( flags: . enforceQoS) { ( ) -> Void in
412
412
if let sema = self . _concurrencyGate {
413
413
sema. wait ( )
414
414
self . _runOperation ( )
@@ -420,7 +420,7 @@ open class OperationQueue: NSObject {
420
420
group. leave ( )
421
421
}
422
422
}
423
- _underlyingQueue. async ( execute: block)
423
+ _underlyingQueue. async ( group : queueGroup , execute: block)
424
424
#endif
425
425
}
426
426
#if DEPLOYMENT_ENABLE_LIBDISPATCH
0 commit comments