Waiting for multiple tasks in a genserver

What’s responsible for deciding to make those requests? If it’s a request from outside doing something like GenServer.call(pid, :make_all_the_requests), what should happen if another make_all_requests comes in while the first one is still processing?

One straightforward alternative would be to have the GenServer launch a single Task which then launches the others and does an await_all.

2 Likes