Skip to content

Instantly share code, notes, and snippets.

@olbrichj
Created January 29, 2018 21:33
Show Gist options
  • Save olbrichj/d38304bbf759f727f3805c48e02af891 to your computer and use it in GitHub Desktop.
Save olbrichj/d38304bbf759f727f3805c48e02af891 to your computer and use it in GitHub Desktop.
let op1 = Operation1()
let op2 = Operation2()
let adapter = BlockOperation() { [unowned op1, unowned op2] in
op2.data = op1.data
}
adapter.addDependency(op1)
op2.addDependency(adapter)
queue.addOperations([op1, op2, adapter], waitUntilFinished: true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment