Skip to content
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

Remove duplicated code in dispatch function #19

Merged
merged 2 commits into from
Mar 1, 2017

Conversation

crbelaus
Copy link
Member

@crbelaus crbelaus commented Mar 1, 2017

Instead of duplicating dispatch and dispatch_async code, we use dispatch_async as the canonical implementation.
dispatch calls dispatch_async and waits synchronously for the task to finish.

Instead of duplicating `dispatch` and `dispatch_async` code, we use
`dispatch_async` as the canonical implementation. `dispatch` calls
`dispatch_async` and waits synchronously for the task to finish.
Copy link
Member

@odarriba odarriba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

{:error, {:unknown_strategy, strategy}}
else
task = Task.async(fn -> handler.call(payload, opts) end)
with {:ok, task} <- dispatch_async(strategy, payload, options) do
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔝

@enoliglesias
Copy link
Member

❤️💙💚💛💜

@odarriba odarriba merged commit c003b2c into master Mar 1, 2017
@odarriba odarriba deleted the remove-duplicate-dispatch branch March 1, 2017 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants