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

Request: Parellelize 2 Or more Tasks And Emit One Single Msg #1098

Open
supermacro opened this issue Jan 18, 2021 · 2 comments
Open

Request: Parellelize 2 Or more Tasks And Emit One Single Msg #1098

supermacro opened this issue Jan 18, 2021 · 2 comments
Labels

Comments

@supermacro
Copy link

This is a feature request.

See here for context: https://old.reddit.com/r/elm/comments/91t937/is_it_possible_to_make_multiple_http_requests_in/

Imagine I have 2 http requests:

  • getDogs : Cmd DogList
  • getCats : Cmd CatList

I would like to run these two in parallel and emit one single message, GotAnimals (DogList, CatList).

Having to handle each msg individually in the update function leads to avoidable complexity.


Edit: There's even a package for this (https://package.elm-lang.org/packages/0ui/elm-task-parallel/latest/), but I think it's a common enough need that it should be baked into the language.

@github-actions
Copy link

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

@evancz evancz transferred this issue from elm/compiler Feb 3, 2021
@github-actions
Copy link

github-actions bot commented Feb 3, 2021

Thanks for reporting this! To set expectations:

  • Issues are reviewed in batches, so it can take some time to get a response.
  • Ask questions a community forum. You will get an answer quicker that way!
  • If you experience something similar, open a new issue. We like duplicates.

Finally, please be patient with the core team. They are trying their best with limited resources.

@evancz evancz added the request label Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants