{"id":16732370,"url":"https://github.com/danielberkompas/async","last_synced_at":"2025-03-15T19:24:54.991Z","repository":{"id":30025218,"uuid":"33574102","full_name":"danielberkompas/async","owner":"danielberkompas","description":"Async/Await pattern for Elixir","archived":false,"fork":false,"pushed_at":"2015-04-07T23:53:05.000Z","size":116,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T08:38:15.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielberkompas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-07T23:42:23.000Z","updated_at":"2023-09-01T11:32:15.000Z","dependencies_parsed_at":"2022-09-06T20:12:59.319Z","dependency_job_id":null,"html_url":"https://github.com/danielberkompas/async","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberkompas%2Fasync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberkompas%2Fasync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberkompas%2Fasync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielberkompas%2Fasync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielberkompas","download_url":"https://codeload.github.com/danielberkompas/async/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243779204,"owners_count":20346675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T23:44:07.126Z","updated_at":"2025-03-15T19:24:54.968Z","avatar_url":"https://github.com/danielberkompas.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"Async\n=====\n\nThe Async/Await pattern for Elixir! For those who prefer this:\n\n```elixir\ndef MyModule do\n  use Async\n\n  def my_function do\n    expensive_result = async OtherModule.expensive_operation(arg1, arg2)\n    lots_of_counting = async for num \u003c- 1..10_000_000, do: num * 2\n    # ...\n    await expensive_result\n    await lots_of_counting\n  end\nend\n```\n\nTo this:\n\n```elixir\ndef MyModule do\n  import Task, only: [await: 1, async: 3, async: 1]\n\n  def my_function do\n    expensive_result = async OtherModule, :expensive_operation, [arg1, arg2]\n    lots_of_counting = async fn -\u003e for num \u003c- 1..10_000_000, do: num * 2 end\n    # ...\n    await expensive_result\n    await lots_of_counting\n  end\nend\n```\n\n## Should you use this?\n\nNo. Probably not. Well, maybe. It's only 20 lines of code, so what could\npossibly go wrong?\n\n## Installation\n\nGet it from Github by updating your `deps` function:\n\n```elixir\ndefp deps do\n  [{:async, github: \"danielberkompas/async\"}]\nend\n```\n\nThen run `mix deps.get` to install.\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielberkompas%2Fasync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielberkompas%2Fasync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielberkompas%2Fasync/lists"}