Skip to content

Instantly share code, notes, and snippets.

@dimohamdy
Created January 6, 2019 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dimohamdy/7f80d18ceb719a83caeeba490bb2eefd to your computer and use it in GitHub Desktop.
Save dimohamdy/7f80d18ceb719a83caeeba490bb2eefd to your computer and use it in GitHub Desktop.
add aDependency between operations
let queue = OperationQueue()
queue.maxConcurrentOperationCount = 1
op3.addDependency(op2)
op2.addDependency(op1)
queue.addOperations([op1,op2,op3], waitUntilFinished: true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment