Skip to content

[Test] Add MultipleTasksTests #64

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

Merged
merged 1 commit into from
May 8, 2016
Merged

[Test] Add MultipleTasksTests #64

merged 1 commit into from
May 8, 2016

Conversation

inamiy
Copy link
Member

@inamiy inamiy commented May 7, 2016

Added multiple-tasks chaining example where each task has different Value/Error types.

This pull request is an answer for https://twitter.com/akio0911/status/728674545582804992 .
/cc @akio0911

Basic ideas are:

  1. Create enum WrappedError for unifying different type-strict error types (and add convenient method e.g. _mapError)
  2. Keep chaining tasks using func success() and handle all results together at last using func on(success:failure:)

Example Flow Chart

@inamiy inamiy merged commit dcb2498 into swift/2.2 May 8, 2016
@inamiy inamiy deleted the Test/MultipleTasks branch May 8, 2016 01:47
@inamiy inamiy added the question label May 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant