Last active
March 7, 2018 10:27
-
-
Save paskowski/78810f1c0621c8c3b2c55a05a78fe874 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension AsyncOperation { | |
override var isAsynchronous: Bool { | |
return true | |
} | |
override var isExecuting: Bool { | |
return state == .executing | |
} | |
override var isFinished: Bool { | |
return state == .finished | |
} | |
override func start() { | |
if isCancelled { | |
return | |
} | |
main() | |
state = .executing | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment