Re: [elixir-core:10186] Proposal: Add function to return the first async task to complete

2021-04-01 Thread José Valim
I don't see a reason why we wouldn't return the same order. You can easily get the ones you want by `for {task, {:ok, value}} <- result do`. Plus forcing people to iterate will remind them that they most likely need to shutdown the other tasks. On Thu, Apr 1, 2021 at 3:57 PM thia.md...@gmail.com

Re: [elixir-core:10186] Proposal: Add function to return the first async task to complete

2021-04-01 Thread thia.md...@gmail.com
> In this sense, yield_many becomes a special case of yield_first where you want to yield on all given tasks. I'm not sure if we would want that, because in yield_many the returned list will be in the same order as the tasks supplied in the tasks input argument. However yield_first to