Created
January 29, 2018 21:35
-
-
Save olbrichj/66cbd2d88ab4785f34424548cb71bdcd 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
class GroupOperation: AsyncOperation { | |
let queue = OperationQueue() | |
var operations: [AsyncOperation] = [] | |
var errors: [Error] = [] | |
override func execute() { | |
print("group started") | |
queue.addOperations(operations, waitUntilFinished: true) | |
print("group done") | |
} | |
func finish(withError errors: [Error]) { | |
self.errors += errors | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment