In a simple case operation2
is dependent on operation1
, however operation1
may fail and in this case we don't want to execute operation2
is it possible to deliver a failed execution inside the operation1
code block? so that operation1
fails to complete and operation2
never gets executed and is disposed?
let operation1 = BlockOperation {
// do smth, which can fail
}
let operation2 = BlockOperation {
}
operation2.addDependency(operation1)