`[BFTask taskForCompletionOfAllTasksWithResults:tasks]` (BUT IN SERIES)
Created by: tettoffensive
I have an undefined number of tasks that I would normally run in parallel. but they involve AVFoundation encoding which errors out when the tasks run in parallel. So I'd ideally like a similar method that just chained them together with the final task.result
being the array of tasks (just as taskForCompletionOfAllTasksWithResults
has.
Right now I'm just looping through the array myself and chaining them together. But in this case I only have the result from the task at the end of the chain.
BFTask *taskChain = nil;
for (BFTask *task in tasks) {
if (!taskChain) {
taskChain = task;
} else {
taskChain = [taskChain continueWithSuccessBlock:^id _Nullable(BFTask * _Nonnull task) {
return task;
}];
}
}