In this example, I am executing several queries, one by one using
locations= user_ids |> Enum.map(&Task.async(fn -> last_location(&1, params, client) end)) |> Enum.map(&Task.await/1)
the above example will wait for each task to finish before executing the next one.
How can I not wait for each task, by starting all of tasks in different process and collect results of all tasks regardless of who is finished first?
I need to wait for all concurrent tasks before return result to client, how would I do that?