Following is the scenario:
listOfUserIds - An array containing user id's
I need to make a service call with each user id and get the full name for that user. It should happen asynchronously, as there are thousands of users.
Two approaches i can think of:
1) Make a service call in the background and wait for it's response. Once i have the response, i will make the second service call. If this is the right approach, how it can be done?
2) Start seperate thread for all service calls, and handle their responses in some method in background thread only.
I tried the second approach but since the response is received in delegate methods, i am not getting success in it.
Can anyone please tell me about a good approach with some psuedo code?