Skip to content

Commit f1da054

Browse files
mamabusiphausler
authored andcommitted
Refactoring enum in NSOperation to align with Darwin version. (#408)
More api changes to NSOperation to align with Darwin version NSOperation API migration to align with that of Darwin version Modifying the api name to sync with Darwin version
1 parent 0ff9f49 commit f1da054

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Foundation/NSOperation.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public class Operation: NSObject {
7474

7575
public func main() { }
7676

77-
public var cancelled: Bool {
77+
public var isCancelled: Bool {
7878
return _cancelled
7979
}
8080

@@ -85,20 +85,20 @@ public class Operation: NSObject {
8585
lock.unlock()
8686
}
8787

88-
public var executing: Bool {
88+
public var isExecuting: Bool {
8989
return _executing
9090
}
9191

92-
public var finished: Bool {
92+
public var isFinished: Bool {
9393
return _finished
9494
}
9595

9696
// - Note: This property is NEVER used in the objective-c implementation!
97-
public var asynchronous: Bool {
97+
public var isAsynchronous: Bool {
9898
return false
9999
}
100100

101-
public var ready: Bool {
101+
public var isReady: Bool {
102102
return _ready
103103
}
104104

@@ -373,9 +373,9 @@ public class OperationQueue: NSObject {
373373

374374
internal func _runOperation() {
375375
if let op = _dequeueOperation() {
376-
if !op.cancelled {
376+
if !op.isCancelled {
377377
op._waitUntilReady()
378-
if !op.cancelled {
378+
if !op.isCancelled {
379379
op.start()
380380
}
381381
}
@@ -390,7 +390,7 @@ public class OperationQueue: NSObject {
390390
}
391391
#endif
392392
/*
393-
If OperationQueuePriority was not supported this could be much faster
393+
If QueuePriority was not supported this could be much faster
394394
since it would not need to have the extra book-keeping for managing a priority
395395
queue. However this implementation attempts to be similar to the specification.
396396
As a concequence this means that the dequeue may NOT nessicarly be the same as

0 commit comments

Comments
 (0)