I have a call that returns a Future. However, I need to make n calls so I will get back n futures. I am wondering how I would get the futures to all resolve before proceeding (without blocking the server)
For example,
while(counter < numCalls){
val future = call(counter)
future.map{ x =>
//do stuff
}
counter += 1
}
//Now I want to execute code here after ALL the futures are resolved without
//blocking the server