[elm-discuss] Re: Parallel http queries: how?

2017-11-28 Thread Frank Bonetti
The only way to execute two Tasks in parallel is to use Cmd.batch. You would think that Task.map2, Task.map3, Task.map4, etc. would execute all tasks in parallel similar to Promise.all, but it doesn't. From the documentation for Task.map2: > Put the results of two tasks together. If either

[elm-discuss] Re: Parallel http queries: how?

2017-11-22 Thread Vadym Chekan
Thanks, it does execute it in parallel. But it is not obvious from API. Also, it is not intuitive to look for http related solutions in Cmd module. Vadym. On Wednesday, November 22, 2017 at 8:08:06 AM UTC-5, Michael Jones wrote: > > I don't think you need to worry about explicitly being

[elm-discuss] Re: Parallel http queries: how?

2017-11-22 Thread Michael Jones
I don't think you need to worry about explicitly being parallel. Http requests will be parallel by default due to their async nature in the Javascript runtime. You can have your app initialisation return two commands, one for each http request and then handle their responses separately. You