-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a result for taskForCompletionOfAllTasks #23
Comments
I would like the same thing. Thanks ! |
Same problem here. [[BFTask taskForCompletionOfAllTasks:tasks] continueWithBlock:^id(BFTask *task) {
for (int i = 0; i < tasks.count; ++i) {
NSLog(@"%@", [tasks[i] result]);
}
return nil;
}]; |
How about this solution: -(BFTask *)parallelTasksWitResult{
} |
You have access to all of the |
In a task chain, the task above has a task array in its closure. The task below needs to get the results of the task array from task.result, but it can't. It can't access the task array either, because the task array is in the scope of the above closure. In a task chain like this, we don't have access to the Or, you may want to get the task that taskForCompletionOfAllTasks gives, and send it somewhere else in your project. Sending the task array along with it is not a good solution. It's a shame that this issue is closed. The analogous Parse.Promise.when([p1, p2]).then(f) passes the result array to f. This is the expected behavior. Respectfully summoning the top contributor @nlutsenko |
This issue is probably actually resolved, since we have |
OOH my bad! Sorry about that, and thank you for this awesome piece of software your highness :) |
I want to do multiple asynchronous tasks in parallel, each of which returns a value, and then when all have completed, get an array of those results.
As of now, taskForCompletionOfAllTasks just returns a result of nil.
The text was updated successfully, but these errors were encountered: